mirror of
https://github.com/huggingface/candle.git
synced 2025-06-15 10:26:33 +00:00
fix: address clippy 0.1.74 issues (#1336)
- clippy::needless-borrows-for-generic-args - clippy::reserve-after-initialization
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user