diff options
Diffstat (limited to 'vendor/rustix/src/path/dec_int.rs')
-rw-r--r-- | vendor/rustix/src/path/dec_int.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/vendor/rustix/src/path/dec_int.rs b/vendor/rustix/src/path/dec_int.rs index 5ba8be4fc..04c97d406 100644 --- a/vendor/rustix/src/path/dec_int.rs +++ b/vendor/rustix/src/path/dec_int.rs @@ -8,20 +8,14 @@ use crate::backend::fd::{AsFd, AsRawFd}; use crate::ffi::CStr; -#[cfg(feature = "std")] -use core::fmt; use core::fmt::Write; use itoa::{Buffer, Integer}; -#[cfg(feature = "std")] -use std::ffi::OsStr; -#[cfg(feature = "std")] -#[cfg(unix)] +#[cfg(all(feature = "std", unix))] use std::os::unix::ffi::OsStrExt; -#[cfg(feature = "std")] -#[cfg(target_os = "wasi")] +#[cfg(all(feature = "std", target_os = "wasi"))] use std::os::wasi::ffi::OsStrExt; #[cfg(feature = "std")] -use std::path::Path; +use {core::fmt, std::ffi::OsStr, std::path::Path}; /// Format an integer into a decimal `Path` component, without constructing a /// temporary `PathBuf` or `String`. @@ -31,10 +25,10 @@ use std::path::Path; /// # Example /// /// ``` -/// # #[cfg(feature = "path")] +/// # #[cfg(any(feature = "fs", feature = "net"))] /// use rustix::path::DecInt; /// -/// # #[cfg(feature = "path")] +/// # #[cfg(any(feature = "fs", feature = "net"))] /// assert_eq!( /// format!("hello {}", DecInt::new(9876).as_ref().display()), /// "hello 9876" |