summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/cstr.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
commita0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch)
treefc451898ccaf445814e26b46664d78702178101d /vendor/rustix/src/cstr.rs
parentAdding debian version 1.71.1+dfsg1-2. (diff)
downloadrustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz
rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/cstr.rs')
-rw-r--r--vendor/rustix/src/cstr.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/rustix/src/cstr.rs b/vendor/rustix/src/cstr.rs
index 01dbe7e2f..0df1bf7cd 100644
--- a/vendor/rustix/src/cstr.rs
+++ b/vendor/rustix/src/cstr.rs
@@ -13,9 +13,9 @@
/// # #[cfg(feature = "fs")]
/// # fn main() -> rustix::io::Result<()> {
/// use rustix::cstr;
-/// use rustix::fs::{cwd, statat, AtFlags};
+/// use rustix::fs::{statat, AtFlags, CWD};
///
-/// let metadata = statat(cwd(), cstr!("test.txt"), AtFlags::empty())?;
+/// let metadata = statat(CWD, cstr!("test.txt"), AtFlags::empty())?;
/// # Ok(())
/// # }
/// # #[cfg(not(feature = "fs"))]
@@ -40,9 +40,9 @@ macro_rules! cstr {
#[allow(unsafe_code, unused_unsafe)]
{
- // Now that we know the string doesn't have embedded NULs, we can call
- // `from_bytes_with_nul_unchecked`, which as of this writing is defined
- // as `#[inline]` and completely optimizes away.
+ // Now that we know the string doesn't have embedded NULs, we can
+ // call `from_bytes_with_nul_unchecked`, which as of this writing
+ // is defined as `#[inline]` and completely optimizes away.
//
// SAFETY: We have manually checked that the string does not contain
// embedded NULs above, and we append or own NUL terminator here.