Skip to content

Commit cfd8ecb

Browse files
committed
Fix some more clippy warnings
1 parent c17977d commit cfd8ecb

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
@@ -418,7 +418,7 @@ impl<R: Read> Decoder<R> {
418418
for (i, plane) in data
419419
.into_iter()
420420
.enumerate()
421-
.filter(|&(_, ref plane)| !plane.is_empty())
421+
.filter(|(_, plane)| !plane.is_empty())
422422
{
423423
planes_u16[i] = plane;
424424
}
@@ -467,7 +467,7 @@ impl<R: Read> Decoder<R> {
467467
for (i, plane) in data
468468
.into_iter()
469469
.enumerate()
470-
.filter(|&(_, ref plane)| !plane.is_empty())
470+
.filter(|(_, plane)| !plane.is_empty())
471471
{
472472
if self.coefficients_finished[i] == !0 {
473473
planes[i] = plane;
@@ -506,14 +506,14 @@ impl<R: Read> Decoder<R> {
506506
let current_dc_tables = mem::take(&mut self.dc_huffman_tables);
507507
self.dc_huffman_tables = dc_tables
508508
.into_iter()
509-
.zip(current_dc_tables.into_iter())
509+
.zip(current_dc_tables)
510510
.map(|(a, b)| a.or(b))
511511
.collect();
512512

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

src/worker/rayon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl ImmediateWorker {
9797
dequantize_and_idct_block(
9898
dct_scale,
9999
coefficients,
100-
&*quantization_table,
100+
&quantization_table,
101101
8,
102102
&mut output_buffer,
103103
);

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)