Skip to content

Commit

Permalink
Opt out of clippy::seek_to_start_instead_of_rewind for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jam1garner committed Feb 5, 2023
1 parent 4975416 commit 9175d20
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions binrw/tests/io/bufreader.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::seek_to_start_instead_of_rewind)]
use binrw::io::{BufReader, Cursor, Read, Seek, SeekFrom};
use std::io::BufRead;

Expand Down
3 changes: 2 additions & 1 deletion binrw/tests/io/no_std/cursor.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::seek_to_start_instead_of_rewind)]
use binrw::io::{Cursor, Read, Seek, SeekFrom};
use std::io::{Read as StdReadExt, Seek as StdSeekExt};

Expand All @@ -19,7 +20,7 @@ fn cursor_test() {
assert_eq!(test.position(), test2.position());
assert_eq!(
test.seek(SeekFrom::Start(0)).unwrap(),
test2.rewind().unwrap(),
test2.seek(std::io::SeekFrom::Start(0)).unwrap(),
);
assert_eq!(
test.seek(SeekFrom::End(-1)).unwrap(),
Expand Down
1 change: 1 addition & 0 deletions binrw/tests/io/seek.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::seek_to_start_instead_of_rewind)]
use binrw::io::{NoSeek, Read, Seek, SeekFrom, Write};

#[test]
Expand Down
1 change: 1 addition & 0 deletions binrw/tests/io/take_seek.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::seek_to_start_instead_of_rewind)]
use binrw::io::{Cursor, Read, Seek, SeekFrom, TakeSeekExt};

#[test]
Expand Down

0 comments on commit 9175d20

Please sign in to comment.