Skip to content

Commit

Permalink
Merge pull request #273 from linkmauve/fix-clippy-warnings
Browse files Browse the repository at this point in the history
Fix some more clippy warnings
  • Loading branch information
fintelia authored Oct 21, 2023
2 parents bb26dc7 + cfd8ecb commit 4d38958
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ impl<R: Read> Decoder<R> {
for (i, plane) in data
.into_iter()
.enumerate()
.filter(|&(_, ref plane)| !plane.is_empty())
.filter(|(_, plane)| !plane.is_empty())
{
planes_u16[i] = plane;
}
Expand Down Expand Up @@ -466,7 +466,7 @@ impl<R: Read> Decoder<R> {
for (i, plane) in data
.into_iter()
.enumerate()
.filter(|&(_, ref plane)| !plane.is_empty())
.filter(|(_, plane)| !plane.is_empty())
{
if self.coefficients_finished[i] == !0 {
planes[i] = plane;
Expand Down Expand Up @@ -505,14 +505,14 @@ impl<R: Read> Decoder<R> {
let current_dc_tables = mem::take(&mut self.dc_huffman_tables);
self.dc_huffman_tables = dc_tables
.into_iter()
.zip(current_dc_tables.into_iter())
.zip(current_dc_tables)
.map(|(a, b)| a.or(b))
.collect();

let current_ac_tables = mem::take(&mut self.ac_huffman_tables);
self.ac_huffman_tables = ac_tables
.into_iter()
.zip(current_ac_tables.into_iter())
.zip(current_ac_tables)
.map(|(a, b)| a.or(b))
.collect();
}
Expand Down
2 changes: 1 addition & 1 deletion src/worker/rayon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl ImmediateWorker {
dequantize_and_idct_block(
dct_scale,
coefficients,
&*quantization_table,
&quantization_table,
8,
&mut output_buffer,
);
Expand Down
1 change: 0 additions & 1 deletion tests/rayon-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ fn decoding_in_global_pool() {

let _: Vec<_> = (0..1024)
.map(|_| {
let path = path.clone();
std::thread::spawn(move || {
let mut decoder = Decoder::new(File::open(&path).unwrap());
let _ = decoder.decode().unwrap();
Expand Down

0 comments on commit 4d38958

Please sign in to comment.