diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/rustix/src/path | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/path')
-rw-r--r-- | vendor/rustix/src/path/arg.rs | 12 | ||||
-rw-r--r-- | vendor/rustix/src/path/dec_int.rs | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/vendor/rustix/src/path/arg.rs b/vendor/rustix/src/path/arg.rs index 3b0ad91ae..4a4c8b30f 100644 --- a/vendor/rustix/src/path/arg.rs +++ b/vendor/rustix/src/path/arg.rs @@ -36,7 +36,7 @@ use {alloc::string::String, alloc::vec::Vec}; /// This is similar to [`AsRef`]`<`[`Path`]`>`, but is implemented for more /// kinds of strings and can convert into more kinds of strings. /// -/// # Example +/// # Examples /// /// ``` /// # #[cfg(any(feature = "fs", feature = "net"))] @@ -1039,7 +1039,7 @@ where buf_ptr.add(bytes.len()).write(0); } - // SAFETY: we just wrote the bytes above and they will remain valid for the + // SAFETY: We just wrote the bytes above and they will remain valid for the // duration of `f` b/c buf doesn't get dropped until the end of the // function. match CStr::from_bytes_with_nul(unsafe { slice::from_raw_parts(buf_ptr, bytes.len() + 1) }) { @@ -1078,15 +1078,15 @@ where return Err(io::Errno::NAMETOOLONG); } - // SAFETY: `bytes.len() < LARGE_PATH_BUFFER_SIZE` which means we have space - // for `bytes.len() + 1` u8s: + // SAFETY: `bytes.len() < LARGE_PATH_BUFFER_SIZE` which means we have + // space for `bytes.len() + 1` u8s: unsafe { ptr::copy_nonoverlapping(bytes.as_ptr(), buf_ptr, bytes.len()); buf_ptr.add(bytes.len()).write(0); } - // SAFETY: we just wrote the bytes above and they will remain valid for the - // duration of `f` b/c buf doesn't get dropped until the end of the + // SAFETY: We just wrote the bytes above and they will remain valid for + // the duration of `f` b/c buf doesn't get dropped until the end of the // function. match CStr::from_bytes_with_nul(unsafe { slice::from_raw_parts(buf_ptr, bytes.len() + 1) }) { diff --git a/vendor/rustix/src/path/dec_int.rs b/vendor/rustix/src/path/dec_int.rs index 04c97d406..e9c46f49a 100644 --- a/vendor/rustix/src/path/dec_int.rs +++ b/vendor/rustix/src/path/dec_int.rs @@ -22,7 +22,7 @@ use {core::fmt, std::ffi::OsStr, std::path::Path}; /// /// This is used for opening paths such as `/proc/self/fd/<fd>` on Linux. /// -/// # Example +/// # Examples /// /// ``` /// # #[cfg(any(feature = "fs", feature = "net"))] |