mirror of
https://github.com/GuillemCastro/spotify-dl.git
synced 2024-11-27 04:20:24 +01:00
fix github-advanced-security comments
This commit is contained in:
parent
60a04f18d6
commit
2dc99e884b
2 changed files with 2 additions and 3 deletions
|
@ -65,7 +65,7 @@ impl Downloader {
|
|||
) -> Result<()> {
|
||||
futures::stream::iter(tracks)
|
||||
.map(|track| {
|
||||
self.download_track(track, &options)
|
||||
self.download_track(track, options)
|
||||
})
|
||||
.buffer_unordered(options.parallel)
|
||||
.try_collect::<Vec<_>>()
|
||||
|
|
|
@ -46,8 +46,7 @@ impl Encoder for Mp3Encoder {
|
|||
move || {
|
||||
let samples: Vec<i16> = samples.samples.iter().map(|&x| x as i16).collect();
|
||||
let input = InterleavedPcm(samples.as_slice());
|
||||
let mut mp3_out_buffer = Vec::new();
|
||||
mp3_out_buffer.reserve(mp3lame_encoder::max_required_buffer_size(samples.len()));
|
||||
let mut mp3_out_buffer = Vec::with_capacity(mp3lame_encoder::max_required_buffer_size(samples.len()));
|
||||
let encoded_size = mp3_encoder
|
||||
.encode(input, mp3_out_buffer.spare_capacity_mut())
|
||||
.map_err(|e| anyhow!("Failed to encode mp3: {}", e))?;
|
||||
|
|
Loading…
Reference in a new issue