diff --git a/crates/rewrite/src/main.rs b/crates/rewrite/src/main.rs index 4c77de45..310ef141 100644 --- a/crates/rewrite/src/main.rs +++ b/crates/rewrite/src/main.rs @@ -249,9 +249,9 @@ fn main() -> Result<()> { let mut buf = io::BufReader::new(file); let mut line = Vec::new(); while buf.read_until(b'\n', &mut line)? != 0 { - if line.ends_with(&[b'\n']) { + if line.ends_with(b"\n") { line.pop(); - if line.ends_with(&[b'\r']) { + if line.ends_with(b"\r") { line.pop(); } } diff --git a/src/read/mod.rs b/src/read/mod.rs index eaf733f1..74954476 100644 --- a/src/read/mod.rs +++ b/src/read/mod.rs @@ -1006,7 +1006,7 @@ impl<'data> CompressedData<'data> { }, ), ) => { - input = &input + input = input .get(length as usize..) .read_error("Invalid zstd compressed data")?; continue;