From cd6f8df1faeaa2e5ba4db43f4ad894dbafd4dc6a Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Wed, 1 Dec 2021 00:05:04 +0000 Subject: [PATCH] Remove unneeded mut --- src/decode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decode.rs b/src/decode.rs index f7016a1..cb3eec8 100644 --- a/src/decode.rs +++ b/src/decode.rs @@ -56,7 +56,7 @@ where // Safety: we have just allocated enough memory to set the length without problems pixels.set_len(n_pixels); } - let mut encoded_data_size = data.len() - QOI_HEADER_SIZE - QOI_PADDING; + let encoded_data_size = data.len() - QOI_HEADER_SIZE - QOI_PADDING; let mut buf = unsafe { // Safety: we will check within the loop that there are no reads outside the slice ReadBuf::new(data.as_ptr().add(QOI_HEADER_SIZE), encoded_data_size)