Skip to content

Commit 16712ed

Browse files
committed
corrections on safety comments
1 parent cce8ee8 commit 16712ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/sys/windows/os_str.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ impl Buf {
7979
pub fn as_slice(&self) -> &Slice {
8080
// Safety: Slice is just a wrapper for Wtf8,
8181
// and as_slice returns &Wtf8. Therefore,
82-
// transmute &Wtf8 to &Slice is safe.
82+
// transmuting &Wtf8 to &Slice is safe.
8383
unsafe { mem::transmute(self.inner.as_slice()) }
8484
}
8585

8686
pub fn as_mut_slice(&mut self) -> &mut Slice {
8787
// Safety: Slice is just a wrapper for Wtf8,
88-
// and as_slice returns &Wtf8. Therefore,
89-
// transmute &mut Wtf8 to &mut Slice is safe.
88+
// and as_mut_slice returns &mut Wtf8. Therefore,
89+
// transmuting &mut Wtf8 to &mut Slice is safe.
9090
unsafe { mem::transmute(self.inner.as_mut_slice()) }
9191
}
9292

0 commit comments

Comments
 (0)