diff options
| author | TyPR124 <t.ruckinger@gmail.com> | 2020-03-16 16:18:35 -0400 |
|---|---|---|
| committer | TyPR124 <t.ruckinger@gmail.com> | 2020-03-16 16:18:35 -0400 |
| commit | 16712ede6202067d0c1b2e23ad95b87e0afd7191 (patch) | |
| tree | 6414648ab463a7a7b4a286b60f6c52651b5896fe | |
| parent | cce8ee8bf7dbf461872d72c8b29302242bb11701 (diff) | |
| download | rust-16712ede6202067d0c1b2e23ad95b87e0afd7191.tar.gz rust-16712ede6202067d0c1b2e23ad95b87e0afd7191.zip | |
corrections on safety comments
| -rw-r--r-- | src/libstd/sys/windows/os_str.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/os_str.rs b/src/libstd/sys/windows/os_str.rs index cd0eaaef5b6..9142b42f558 100644 --- a/src/libstd/sys/windows/os_str.rs +++ b/src/libstd/sys/windows/os_str.rs @@ -79,14 +79,14 @@ impl Buf { pub fn as_slice(&self) -> &Slice { // Safety: Slice is just a wrapper for Wtf8, // and as_slice returns &Wtf8. Therefore, - // transmute &Wtf8 to &Slice is safe. + // transmuting &Wtf8 to &Slice is safe. unsafe { mem::transmute(self.inner.as_slice()) } } pub fn as_mut_slice(&mut self) -> &mut Slice { // Safety: Slice is just a wrapper for Wtf8, - // and as_slice returns &Wtf8. Therefore, - // transmute &mut Wtf8 to &mut Slice is safe. + // and as_mut_slice returns &mut Wtf8. Therefore, + // transmuting &mut Wtf8 to &mut Slice is safe. unsafe { mem::transmute(self.inner.as_mut_slice()) } } |
