Skip to content

Commit bc4a9b9

Browse files
committed
Relax minimum rust version
1 parent 70c1668 commit bc4a9b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/idct.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ fn dequantize_and_idct_block_8x8_inner<'a, I>(
139139
// to encode as 0..255 by adding 128, so we'll add that before the shift
140140
const X_SCALE: i32 = 65536 + (128 << 17);
141141

142-
let [s0, rest @ ..] = chunk;
142+
// TODO When the minimum rust version supports it
143+
// let [s0, rest @ ..] = chunk;
144+
let (s0, rest) = chunk.split_first().unwrap();
143145
if *rest == [Wrapping(0); 7] {
144146
let dcterm = stbi_clamp((stbi_fsh(*s0) + Wrapping(X_SCALE)) >> 17);
145147
output_chunk[0] = dcterm;

0 commit comments

Comments
 (0)