Skip to content

Commit 892399a

Browse files
hoshinolinajannau
authored andcommitted
kernel: str: Add/fix SAFETY comments
Signed-off-by: Asahi Lina <lina@asahilina.net>
1 parent b70c636 commit 892399a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/kernel/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl CStr {
306306
/// ```
307307
#[inline]
308308
pub unsafe fn as_str_unchecked(&self) -> &str {
309-
// SAFETY: TODO.
309+
// SAFETY: Depends on the above safety contract
310310
unsafe { core::str::from_utf8_unchecked(self.as_bytes()) }
311311
}
312312

0 commit comments

Comments
 (0)