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 @@ -2319,20 +2319,20 @@ pub mod raw {
23192319 }
23202320
23212321 /// Removes the last byte from a string and returns it. (Not UTF-8 safe).
2322- pub fn pop_byte ( s : & mut ~str ) -> u8 {
2322+ pub unsafe fn pop_byte ( s : & mut ~str ) -> u8 {
23232323 let len = len ( * s) ;
23242324 assert ! ( ( len > 0 u) ) ;
23252325 let b = s[ len - 1 u] ;
2326- unsafe { set_len ( s, len - 1 u) } ;
2326+ set_len ( s, len - 1 u) ;
23272327 return b;
23282328 }
23292329
23302330 /// Removes the first byte from a string and returns it. (Not UTF-8 safe).
2331- pub fn shift_byte ( s : & mut ~str ) -> u8 {
2331+ pub unsafe fn shift_byte ( s : & mut ~str ) -> u8 {
23322332 let len = len ( * s) ;
23332333 assert ! ( ( len > 0 u) ) ;
23342334 let b = s[ 0 ] ;
2335- * s = unsafe { raw:: slice_bytes_owned ( * s, 1 u, len) } ;
2335+ * s = raw:: slice_bytes_owned ( * s, 1 u, len) ;
23362336 return b;
23372337 }
23382338
You can’t perform that action at this time.
0 commit comments