mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 19:04:07 +00:00
Fix unncessary mut
This commit is contained in:
parent
16305f8c95
commit
194a197360
1 changed files with 3 additions and 7 deletions
|
@ -98,11 +98,7 @@ impl PakReader {
|
||||||
&self.pak.mount_point
|
&self.pak.mount_point
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get<R: Read + Seek>(
|
pub fn get<R: Read + Seek>(&self, path: &str, reader: &mut R) -> Result<Vec<u8>, super::Error> {
|
||||||
&mut self,
|
|
||||||
path: &str,
|
|
||||||
reader: &mut R,
|
|
||||||
) -> Result<Vec<u8>, super::Error> {
|
|
||||||
let mut data = Vec::new();
|
let mut data = Vec::new();
|
||||||
self.read_file(path, reader, &mut data)?;
|
self.read_file(path, reader, &mut data)?;
|
||||||
Ok(data)
|
Ok(data)
|
||||||
|
@ -567,7 +563,7 @@ mod test {
|
||||||
let bytes = include_bytes!("../tests/packs/pack_v8b.pak");
|
let bytes = include_bytes!("../tests/packs/pack_v8b.pak");
|
||||||
|
|
||||||
let mut reader = Cursor::new(bytes);
|
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 writer = Cursor::new(vec![]);
|
||||||
let mut pak_writer = super::PakWriter::new(
|
let mut pak_writer = super::PakWriter::new(
|
||||||
writer,
|
writer,
|
||||||
|
@ -594,7 +590,7 @@ mod test {
|
||||||
let bytes = include_bytes!("../tests/packs/pack_v11.pak");
|
let bytes = include_bytes!("../tests/packs/pack_v11.pak");
|
||||||
|
|
||||||
let mut reader = Cursor::new(bytes);
|
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 writer = Cursor::new(vec![]);
|
||||||
let mut pak_writer = super::PakWriter::new(
|
let mut pak_writer = super::PakWriter::new(
|
||||||
writer,
|
writer,
|
||||||
|
|
Loading…
Reference in a new issue