From 194a1973603f01487b2679c30c551a3460f17fda Mon Sep 17 00:00:00 2001 From: Truman Kilen Date: Tue, 7 Feb 2023 22:48:07 -0600 Subject: [PATCH] Fix unncessary mut --- repak/src/pak.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/repak/src/pak.rs b/repak/src/pak.rs index b16a917..5ceb55e 100644 --- a/repak/src/pak.rs +++ b/repak/src/pak.rs @@ -98,11 +98,7 @@ impl PakReader { &self.pak.mount_point } - pub fn get( - &mut self, - path: &str, - reader: &mut R, - ) -> Result, super::Error> { + pub fn get(&self, path: &str, reader: &mut R) -> Result, super::Error> { let mut data = Vec::new(); self.read_file(path, reader, &mut data)?; Ok(data) @@ -567,7 +563,7 @@ mod test { let bytes = include_bytes!("../tests/packs/pack_v8b.pak"); let mut reader = Cursor::new(bytes); - let mut pak_reader = super::PakReader::new_any(&mut reader, None).unwrap(); + let pak_reader = super::PakReader::new_any(&mut reader, None).unwrap(); let writer = Cursor::new(vec![]); let mut pak_writer = super::PakWriter::new( writer, @@ -594,7 +590,7 @@ mod test { let bytes = include_bytes!("../tests/packs/pack_v11.pak"); let mut reader = Cursor::new(bytes); - let mut pak_reader = super::PakReader::new_any(&mut reader, None).unwrap(); + let pak_reader = super::PakReader::new_any(&mut reader, None).unwrap(); let writer = Cursor::new(vec![]); let mut pak_writer = super::PakWriter::new( writer,