File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,15 @@ impl Buf {
7878
7979 pub fn as_slice ( & self ) -> & Slice {
8080 // Safety: Slice is just a wrapper for Wtf8,
81- // and as_slice returns &Wtf8. Therefore,
82- // transmuting &Wtf8 to &Slice is safe.
81+ // and self.inner. as_slice() returns &Wtf8.
82+ // Therefore, 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_mut_slice returns &mut Wtf8. Therefore,
89- // transmuting &mut Wtf8 to &mut Slice is safe.
88+ // and self.inner. as_mut_slice() returns &mut Wtf8.
89+ // Therefore, transmuting &mut Wtf8 to &mut Slice is safe.
9090 unsafe { mem:: transmute ( self . inner . as_mut_slice ( ) ) }
9191 }
9292
You can’t perform that action at this time.
0 commit comments