# HG changeset patch # User Emmanuel Gil Peyrot # Date 1609817325 -3600 # Node ID eba9a3d0c484fb7c1e4c77926747fdd55db6f8e1 # Parent abcb586566e6e8005adf4c2953be5254ebc2f428 formats: Fix the tests. diff --git a/formats/src/th06/pbg3.rs b/formats/src/th06/pbg3.rs --- a/formats/src/th06/pbg3.rs +++ b/formats/src/th06/pbg3.rs @@ -166,12 +166,11 @@ pub fn from_path_buffered #[cfg(test)] mod tests { use super::*; - use crate::util::SeekableSlice; - use std::fs::File; + use std::io::Cursor; #[test] fn bitstream() { - let data = SeekableSlice::new(b"Hello world!\0"); + let data = Cursor::new(b"Hello world!\0"); let bitstream = BitStream::new(data); let mut pbg3 = PBG3BitStream::new(bitstream); assert_eq!(pbg3.read_string(42).unwrap(), b"Hello world!"); @@ -193,7 +192,7 @@ mod tests { let mut pbg3 = PBG3::from_file(file).unwrap(); let files = pbg3.list_files().cloned().collect::>(); for filename in files { - pbg3.get_file(filename, true).unwrap(); + pbg3.get_file(&filename, true).unwrap(); } } }