Skip to content

Commit 76ea8cb

Browse files
committed
Fix some clippy lints.
1 parent 825b1e7 commit 76ea8cb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cap-fs-ext/src/dir_ext.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ impl DirExtUtf8 for cap_std::fs_utf8::Dir {
982982
&self.as_filelike_view::<std::fs::File>(),
983983
path.as_ref().as_ref(),
984984
) {
985-
Ok(file) => Ok(Self::from_std_file(file.into())),
985+
Ok(file) => Ok(Self::from_std_file(file)),
986986
Err(e) => Err(e),
987987
}
988988
}

cap-net-ext/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ impl PoolExt for Pool {
336336
for addr in addrs {
337337
self._pool().check_addr(&addr)?;
338338

339-
match rustix::net::connect(&socket, &addr) {
339+
match rustix::net::connect(socket, &addr) {
340340
Ok(()) => return Ok(()),
341341
Err(err) => last_err = Some(err),
342342
}

cap-primitives/src/rustix/linux/fs/open_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub(crate) fn open_impl(
3737
// If we got anything other than a `ENOSYS` error, that's our result.
3838
match result {
3939
Err(err) if err.raw_os_error() == Some(rustix::io::Errno::NOSYS.raw_os_error()) => {}
40-
Err(err) => return Err(err.into()),
40+
Err(err) => return Err(err),
4141
Ok(fd) => return Ok(fd),
4242
}
4343
}

cap-tempfile/src/utf8.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ impl TempDir {
7171
pub fn new_in(dir: &Dir) -> io::Result<Self> {
7272
for _ in 0..Self::num_iterations() {
7373
let name = &Self::new_name();
74-
match dir.create_dir(&name) {
74+
match dir.create_dir(name) {
7575
Ok(()) => {
76-
let dir = match dir.open_dir(&name) {
76+
let dir = match dir.open_dir(name) {
7777
Ok(dir) => dir,
7878
Err(e) => {
7979
dir.remove_dir(name).ok();

0 commit comments

Comments
 (0)