Skip to content

Commit

Permalink
Fix some clippy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Apr 12, 2023
1 parent 825b1e7 commit 76ea8cb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cap-fs-ext/src/dir_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ impl DirExtUtf8 for cap_std::fs_utf8::Dir {
&self.as_filelike_view::<std::fs::File>(),
path.as_ref().as_ref(),
) {
Ok(file) => Ok(Self::from_std_file(file.into())),
Ok(file) => Ok(Self::from_std_file(file)),
Err(e) => Err(e),
}
}
Expand Down
2 changes: 1 addition & 1 deletion cap-net-ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl PoolExt for Pool {
for addr in addrs {
self._pool().check_addr(&addr)?;

match rustix::net::connect(&socket, &addr) {
match rustix::net::connect(socket, &addr) {
Ok(()) => return Ok(()),
Err(err) => last_err = Some(err),
}
Expand Down
2 changes: 1 addition & 1 deletion cap-primitives/src/rustix/linux/fs/open_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub(crate) fn open_impl(
// If we got anything other than a `ENOSYS` error, that's our result.
match result {
Err(err) if err.raw_os_error() == Some(rustix::io::Errno::NOSYS.raw_os_error()) => {}
Err(err) => return Err(err.into()),
Err(err) => return Err(err),
Ok(fd) => return Ok(fd),
}
}
Expand Down
4 changes: 2 additions & 2 deletions cap-tempfile/src/utf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ impl TempDir {
pub fn new_in(dir: &Dir) -> io::Result<Self> {
for _ in 0..Self::num_iterations() {
let name = &Self::new_name();
match dir.create_dir(&name) {
match dir.create_dir(name) {
Ok(()) => {
let dir = match dir.open_dir(&name) {
let dir = match dir.open_dir(name) {
Ok(dir) => dir,
Err(e) => {
dir.remove_dir(name).ok();
Expand Down

0 comments on commit 76ea8cb

Please sign in to comment.