]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/ffi/c_str.rs
Capitalize safety comments
[rust.git] / library / std / src / ffi / c_str.rs
index 51deb217c7c29a3b8e06fccb1d40e473082927fd..13021738af139fe3635d0271308c1309400e5ba7 100644 (file)
@@ -881,13 +881,13 @@ fn from(v: Vec<NonZeroU8>) -> CString {
         unsafe {
             // Transmute `Vec<NonZeroU8>` to `Vec<u8>`.
             let v: Vec<u8> = {
-                // Safety:
+                // SAFETY:
                 //   - transmuting between `NonZeroU8` and `u8` is sound;
                 //   - `alloc::Layout<NonZeroU8> == alloc::Layout<u8>`.
                 let (ptr, len, cap): (*mut NonZeroU8, _, _) = Vec::into_raw_parts(v);
                 Vec::from_raw_parts(ptr.cast::<u8>(), len, cap)
             };
-            // Safety: `v` cannot contain null bytes, given the type-level
+            // SAFETY: `v` cannot contain null bytes, given the type-level
             // invariant of `NonZeroU8`.
             CString::from_vec_unchecked(v)
         }