From 184ab8f5ca6f6019692d875c5407c31e53e268cc Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 30 Jan 2024 21:19:14 -0800 Subject: [PATCH] fix: drop redox_syscall dependency (#272) fixes #271 --- Cargo.toml | 3 --- src/file/imp/unix.rs | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bfe3e0447..c9f13abb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,9 +30,6 @@ features = [ "Win32_Foundation", ] -[target.'cfg(target_os = "redox")'.dependencies] -redox_syscall = "0.4" - [dev-dependencies] doc-comment = "0.3" diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index 79aba783e..1f179276f 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -141,7 +141,8 @@ pub fn persist(old_path: &Path, new_path: &Path, overwrite: bool) -> io::Result< #[cfg(target_os = "redox")] pub fn persist(_old_path: &Path, _new_path: &Path, _overwrite: bool) -> io::Result<()> { // XXX implement when possible - Err(io::Error::from_raw_os_error(syscall::ENOSYS)) + use rustix::io::Errno; + Err(Errno::NOSYS.into()) } pub fn keep(_: &Path) -> io::Result<()> {