Skip to content

Commit 4d38958

Browse files
authored
Merge pull request #273 from linkmauve/fix-clippy-warnings
Fix some more clippy warnings
2 parents bb26dc7 + cfd8ecb commit 4d38958

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/decoder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<R: Read> Decoder<R> {
417417
for (i, plane) in data
418418
.into_iter()
419419
.enumerate()
420-
.filter(|&(_, ref plane)| !plane.is_empty())
420+
.filter(|(_, plane)| !plane.is_empty())
421421
{
422422
planes_u16[i] = plane;
423423
}
@@ -466,7 +466,7 @@ impl<R: Read> Decoder<R> {
466466
for (i, plane) in data
467467
.into_iter()
468468
.enumerate()
469-
.filter(|&(_, ref plane)| !plane.is_empty())
469+
.filter(|(_, plane)| !plane.is_empty())
470470
{
471471
if self.coefficients_finished[i] == !0 {
472472
planes[i] = plane;
@@ -505,14 +505,14 @@ impl<R: Read> Decoder<R> {
505505
let current_dc_tables = mem::take(&mut self.dc_huffman_tables);
506506
self.dc_huffman_tables = dc_tables
507507
.into_iter()
508-
.zip(current_dc_tables.into_iter())
508+
.zip(current_dc_tables)
509509
.map(|(a, b)| a.or(b))
510510
.collect();
511511

512512
let current_ac_tables = mem::take(&mut self.ac_huffman_tables);
513513
self.ac_huffman_tables = ac_tables
514514
.into_iter()
515-
.zip(current_ac_tables.into_iter())
515+
.zip(current_ac_tables)
516516
.map(|(a, b)| a.or(b))
517517
.collect();
518518
}

src/worker/rayon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl ImmediateWorker {
9595
dequantize_and_idct_block(
9696
dct_scale,
9797
coefficients,
98-
&*quantization_table,
98+
&quantization_table,
9999
8,
100100
&mut output_buffer,
101101
);

tests/rayon-2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ fn decoding_in_global_pool() {
1313

1414
let _: Vec<_> = (0..1024)
1515
.map(|_| {
16-
let path = path.clone();
1716
std::thread::spawn(move || {
1817
let mut decoder = Decoder::new(File::open(&path).unwrap());
1918
let _ = decoder.decode().unwrap();

0 commit comments

Comments
 (0)