mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 14:12:31 +00:00
Use Seek::rewind() in tests
This commit is contained in:
parent
77ed8facbc
commit
b07adbed33
1 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ macro_rules! temp_file {
|
|||
let mut file = tempfile::tempfile().unwrap();
|
||||
file.write_all(&std::fs::read($path).unwrap()).unwrap();
|
||||
|
||||
file.seek(std::io::SeekFrom::Start(0)).unwrap();
|
||||
file.rewind().unwrap();
|
||||
|
||||
file
|
||||
}};
|
||||
|
@ -67,7 +67,7 @@ macro_rules! set_artist {
|
|||
ItemValue::Text(String::from($new_value)),
|
||||
));
|
||||
|
||||
$file_write.seek(std::io::SeekFrom::Start(0)).unwrap();
|
||||
$file_write.rewind().unwrap();
|
||||
|
||||
$tag.save_to(&mut $file_write).unwrap();
|
||||
};
|
||||
|
@ -86,11 +86,11 @@ macro_rules! remove_tag {
|
|||
.unwrap();
|
||||
assert!(tagged_file.tag($tag_type).is_some());
|
||||
|
||||
file.seek(std::io::SeekFrom::Start(0)).unwrap();
|
||||
file.rewind().unwrap();
|
||||
|
||||
$tag_type.remove_from(&mut file).unwrap();
|
||||
|
||||
file.seek(std::io::SeekFrom::Start(0)).unwrap();
|
||||
file.rewind().unwrap();
|
||||
|
||||
let tagged_file = lofty::Probe::new(&mut file)
|
||||
.options(lofty::ParseOptions::new().read_properties(false))
|
||||
|
|
Loading…
Reference in a new issue