Skip to content

Commit

Permalink
move to &mut self
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusSorealheis committed Mar 7, 2024
1 parent b8e9521 commit 964b481
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tokio/src/fs/file.rs
Expand Up @@ -234,7 +234,7 @@ impl File {
/// let file = tokio::fs::File::from_std(std_file);
/// ```
pub fn from_std(mut std: StdFile) -> File {
let pos = std.seek(SeekFrom::Current(0)).unwrap();
let pos = std.stream_position().unwrap();
File {
std: Arc::new(std),
inner: Mutex::new(Inner {
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/fs/mocks.rs
Expand Up @@ -65,7 +65,7 @@ impl Read for &'_ MockFile {
}
}

impl Seek for &'_ MockFile {
impl Seek for MockFile {
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
self.inner_seek(pos)
}
Expand Down

0 comments on commit 964b481

Please sign in to comment.