Skip to content

Commit aaf05e5

Browse files
authored
Merge pull request #83 from kaksmet/revert-82-spectral_selection
Revert "Needless clone and pass by value"
2 parents d344912 + b1b3632 commit aaf05e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ impl<R: Read> Decoder<R> {
460460
&mut huffman,
461461
self.dc_huffman_tables[scan.dc_table_indices[i]].as_ref(),
462462
self.ac_huffman_tables[scan.ac_table_indices[i]].as_ref(),
463-
&scan.spectral_selection,
463+
scan.spectral_selection.clone(),
464464
scan.successive_approximation_low,
465465
&mut eob_run,
466466
&mut dc_predictors[i])?;
@@ -547,7 +547,7 @@ fn decode_block<R: Read>(reader: &mut R,
547547
huffman: &mut HuffmanDecoder,
548548
dc_table: Option<&HuffmanTable>,
549549
ac_table: Option<&HuffmanTable>,
550-
spectral_selection: &Range<u8>,
550+
spectral_selection: Range<u8>,
551551
successive_approximation_low: u8,
552552
eob_run: &mut u16,
553553
dc_predictor: &mut i16) -> Result<()> {

0 commit comments

Comments
 (0)