diff options
Diffstat (limited to 'vendor/rustix/src/ffi.rs')
-rw-r--r-- | vendor/rustix/src/ffi.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/rustix/src/ffi.rs b/vendor/rustix/src/ffi.rs index bd04a9cb4..ef9f87d81 100644 --- a/vendor/rustix/src/ffi.rs +++ b/vendor/rustix/src/ffi.rs @@ -9,8 +9,7 @@ pub use { // If we don't have std, we can depend on core and alloc having these features // in Rust 1.64+. +#[cfg(all(feature = "alloc", not(feature = "std")))] +pub use alloc::ffi::{CString, NulError}; #[cfg(not(feature = "std"))] -pub use { - alloc::ffi::{CString, NulError}, - core::ffi::{c_char, CStr, FromBytesWithNulError}, -}; +pub use core::ffi::{c_char, CStr, FromBytesWithNulError}; |