diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index da84d9e..cb4e788 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,7 +18,7 @@ concurrency: env: CARGO_TERM_COLOR: always # Pinned toolchain for linting - ACTIONS_LINTS_TOOLCHAIN: 1.75.0 + ACTIONS_LINTS_TOOLCHAIN: 1.86.0 jobs: tests-stable: diff --git a/Cargo.toml b/Cargo.toml index 790b146..653e58f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,17 +2,17 @@ authors = ["Colin Walters "] description = "Extension APIs for cap-std" edition = "2021" -rust-version = "1.70.0" +rust-version = "1.86.0" license = "MIT OR Apache-2.0" name = "cap-std-ext" readme = "README.md" repository = "https://github.com/coreos/cap-std-ext" # For historical reasons, the major version number is one greater than the cap-std major. -version = "4.0.7" +version = "5.0.0" [dependencies] -cap-tempfile = "3.2.0" -cap-primitives = "3" +cap-tempfile = "4" +cap-primitives = "4" [target.'cfg(not(windows))'.dependencies] rustix = { version = "1.0", features = ["fs", "process", "pipe"] } diff --git a/src/dirext.rs b/src/dirext.rs index 078ed3d..45694ca 100644 --- a/src/dirext.rs +++ b/src/dirext.rs @@ -425,7 +425,7 @@ enum DirOwnedOrBorrowed<'d> { Borrowed(&'d Dir), } -impl<'d> Deref for DirOwnedOrBorrowed<'d> { +impl Deref for DirOwnedOrBorrowed<'_> { type Target = Dir; fn deref(&self) -> &Self::Target { @@ -662,7 +662,7 @@ impl CapStdExtDirExt for Dir { if !self.symlink_metadata(p)?.is_dir() { // TODO use https://doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.NotADirectory // once it's stable. - return Err(io::Error::new(io::ErrorKind::Other, "Found non-directory")); + return Err(io::Error::other("Found non-directory")); } Ok(false) } @@ -829,7 +829,7 @@ impl CapStdExtDirExt for Dir { #[cfg(any(target_os = "android", target_os = "linux"))] fn is_mountpoint(&self, path: impl AsRef) -> Result> { - is_mountpoint_impl_statx(self, path.as_ref()).map_err(Into::into) + is_mountpoint_impl_statx(self, path.as_ref()) } #[cfg(any(target_os = "android", target_os = "linux"))] diff --git a/tests/it/main.rs b/tests/it/main.rs index a745b91..69f591b 100644 --- a/tests/it/main.rs +++ b/tests/it/main.rs @@ -316,7 +316,7 @@ fn link_tempfile_with() -> Result<()> { let e = td .atomic_replace_with(p, |f| { writeln!(f, "should not be written")?; - Err::<(), _>(std::io::Error::new(std::io::ErrorKind::Other, "oops")) + Err::<(), _>(std::io::Error::other("oops")) }) .err() .unwrap(); @@ -625,7 +625,7 @@ fn test_walk() -> std::io::Result<()> { { let r: std::io::Result<_> = td.walk(&WalkConfiguration::default(), |e| { if e.path.strip_prefix("usr/share").is_ok() { - return Err(std::io::Error::new(std::io::ErrorKind::Other, "oops")); + return Err(std::io::Error::other("oops")); } Ok(ControlFlow::Continue(())) });