projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: fix most clippy warnings
[nihav.git]
/
nihav-core
/
src
/
dsp
/
fft.rs
diff --git
a/nihav-core/src/dsp/fft.rs
b/nihav-core/src/dsp/fft.rs
index 1255f6c5db0138d2299adde56a89fa97b43c4640..ee4ab7c774b58c065a75b2263126ec40fbc9a7fb 100644
(file)
--- a/
nihav-core/src/dsp/fft.rs
+++ b/
nihav-core/src/dsp/fft.rs
@@
-542,9
+542,7
@@
impl FFT {
for idx in 0..self.swaps.len() {
let nidx = self.swaps[idx];
if idx != nidx {
for idx in 0..self.swaps.len() {
let nidx = self.swaps[idx];
if idx != nidx {
- let t = data[nidx];
- data[nidx] = data[idx];
- data[idx] = t;
+ data.swap(nidx, idx);
}
}
self.do_fft_core(data);
}
}
self.do_fft_core(data);
@@
-553,9
+551,7
@@
impl FFT {
for idx in 0..self.swaps.len() {
let nidx = self.swaps[idx];
if idx != nidx {
for idx in 0..self.swaps.len() {
let nidx = self.swaps[idx];
if idx != nidx {
- let t = data[nidx];
- data[nidx] = data[idx];
- data[idx] = t;
+ data.swap(nidx, idx);
}
}
self.do_ifft_core(data);
}
}
self.do_ifft_core(data);