Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cap-async-std/src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl File {
spawn_blocking(move || {
open_ambient(
path.as_ref(),
&OpenOptions::new().read(true),
OpenOptions::new().read(true),
ambient_authority,
)
})
Expand Down
2 changes: 1 addition & 1 deletion cap-primitives/src/rustix/fs/copy_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub(crate) fn copy_impl(
}
copy_result
} else {
Err(rustix::io::Errno::NOSYS.into())
Err(rustix::io::Errno::NOSYS)
};
match copy_result {
Ok(ret) => written += ret as u64,
Expand Down
3 changes: 2 additions & 1 deletion cap-primitives/src/rustix/fs/read_dir_inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ impl Iterator for ReadDirInner {

fn next(&mut self) -> Option<Self::Item> {
loop {
let entry = match self.rustix.lock().unwrap().0.read()? {
let entry = self.rustix.lock().unwrap().0.read()?;
let entry = match entry {
Ok(entry) => entry,
Err(e) => return Some(Err(e.into())),
};
Expand Down
4 changes: 2 additions & 2 deletions cap-primitives/src/rustix/linux/fs/open_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ pub(crate) fn open_beneath(
break;
}

_ => return Err(err.into()),
_ => return Err(err),
},
}
}

Err(rustix::io::Errno::NOSYS.into())
Err(rustix::io::Errno::NOSYS)
})
.map_err(|err| match err {
rustix::io::Errno::XDEV => errors::escape_attempt(),
Expand Down
2 changes: 1 addition & 1 deletion cap-std/src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl File {
) -> io::Result<Self> {
let std = open_ambient(
path.as_ref(),
&OpenOptions::new().read(true),
OpenOptions::new().read(true),
ambient_authority,
)?;
Ok(Self::from_std(std))
Expand Down
2 changes: 1 addition & 1 deletion cap-std/src/fs_utf8/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn to_utf8<P: AsRef<std::path::Path>>(path: P) -> std::io::Result<Utf8PathBuf> {
#[cfg(not(windows))]
{
Ok(Utf8Path::from_path(path.as_ref())
.ok_or_else(|| ::rustix::io::Errno::ILSEQ)?
.ok_or(::rustix::io::Errno::ILSEQ)?
.to_path_buf())
}

Expand Down
2 changes: 1 addition & 1 deletion cap-tempfile/src/tempfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl<'d> TempFile<'d> {
// But, if we catch an error here, then move ownership back into self,
// which means the Drop invocation will clean it up.
self.name = Some(tempname);
e.into()
e
})
}

Expand Down