diff options
Diffstat (limited to 'candle-wasm-examples/whisper/src')
-rw-r--r-- | candle-wasm-examples/whisper/src/audio.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/candle-wasm-examples/whisper/src/audio.rs b/candle-wasm-examples/whisper/src/audio.rs index a3ca6c73..b87f7df1 100644 --- a/candle-wasm-examples/whisper/src/audio.rs +++ b/candle-wasm-examples/whisper/src/audio.rs @@ -59,8 +59,7 @@ fn dft<T: Float>(inp: &[T]) -> Vec<T> { let n = inp.len(); let two_pi = T::PI() + T::PI(); - let mut out = Vec::new(); - out.reserve(2 * n); + let mut out = Vec::with_capacity(2 * n); let n_t = T::from(n).unwrap(); for k in 0..n { let k_t = T::from(k).unwrap(); |