Skip to content

Commit

Permalink
Resolve clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Nov 28, 2022
1 parent 8b4dad4 commit ed2c4bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions test/sys/test_aio.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{
io::{Read, Seek, SeekFrom, Write},
io::{Read, Seek, Write},
ops::Deref,
os::unix::io::AsRawFd,
pin::Pin,
Expand Down Expand Up @@ -371,7 +371,7 @@ mod aio_write {
assert_eq!(err, Ok(()));
assert_eq!(aiow.as_mut().aio_return().unwrap(), wbuf.len());

f.seek(SeekFrom::Start(0)).unwrap();
f.rewind().unwrap();
let len = f.read_to_end(&mut rbuf).unwrap();
assert_eq!(len, EXPECT.len());
assert_eq!(rbuf, EXPECT);
Expand Down Expand Up @@ -402,7 +402,7 @@ mod aio_write {
assert_eq!(err, Ok(()));
assert_eq!(aiow.as_mut().aio_return().unwrap(), wbuf.len());

f.seek(SeekFrom::Start(0)).unwrap();
f.rewind().unwrap();
let len = f.read_to_end(&mut rbuf).unwrap();
assert_eq!(len, EXPECT.len());
assert_eq!(rbuf, EXPECT);
Expand Down Expand Up @@ -537,7 +537,7 @@ fn sigev_signal() {
}

assert_eq!(aiow.as_mut().aio_return().unwrap(), WBUF.len());
f.seek(SeekFrom::Start(0)).unwrap();
f.rewind().unwrap();
let len = f.read_to_end(&mut rbuf).unwrap();
assert_eq!(len, EXPECT.len());
assert_eq!(rbuf, EXPECT);
Expand Down
4 changes: 2 additions & 2 deletions test/test_fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ fn test_readlink() {
mod linux_android {
use libc::loff_t;
use std::io::prelude::*;
use std::io::{IoSlice, SeekFrom};
use std::io::IoSlice;
use std::os::unix::prelude::*;

use nix::fcntl::*;
Expand Down Expand Up @@ -272,7 +272,7 @@ mod linux_android {
.unwrap();

let mut res: String = String::new();
tmp2.seek(SeekFrom::Start(0)).unwrap();
tmp2.rewind().unwrap();
tmp2.read_to_string(&mut res).unwrap();

assert_eq!(res, String::from("bar"));
Expand Down

0 comments on commit ed2c4bf

Please sign in to comment.