@@ -40,9 +40,7 @@ fn advance_filled() {
4040 let buf: & mut [ _ ] = & mut [ 0 ; 16 ] ;
4141 let mut rbuf: BorrowedBuf < ' _ > = buf. into ( ) ;
4242
43- unsafe {
44- rbuf. unfilled ( ) . advance ( 1 ) ;
45- }
43+ rbuf. unfilled ( ) . advance ( 1 ) ;
4644
4745 assert_eq ! ( rbuf. filled( ) . len( ) , 1 ) ;
4846 assert_eq ! ( rbuf. unfilled( ) . capacity( ) , 15 ) ;
@@ -53,9 +51,7 @@ fn clear() {
5351 let buf: & mut [ _ ] = & mut [ 255 ; 16 ] ;
5452 let mut rbuf: BorrowedBuf < ' _ > = buf. into ( ) ;
5553
56- unsafe {
57- rbuf. unfilled ( ) . advance ( 16 ) ;
58- }
54+ rbuf. unfilled ( ) . advance ( 16 ) ;
5955
6056 assert_eq ! ( rbuf. filled( ) . len( ) , 16 ) ;
6157 assert_eq ! ( rbuf. unfilled( ) . capacity( ) , 0 ) ;
@@ -79,9 +75,7 @@ fn set_init() {
7975
8076 assert_eq ! ( rbuf. init_len( ) , 8 ) ;
8177
82- unsafe {
83- rbuf. unfilled ( ) . advance ( 4 ) ;
84- }
78+ rbuf. unfilled ( ) . advance ( 4 ) ;
8579
8680 unsafe {
8781 rbuf. set_init ( 2 ) ;
@@ -153,9 +147,7 @@ fn cursor_set_init() {
153147 assert_eq ! ( rbuf. unfilled( ) . uninit_mut( ) . len( ) , 8 ) ;
154148 assert_eq ! ( unsafe { rbuf. unfilled( ) . as_mut( ) } . len( ) , 16 ) ;
155149
156- unsafe {
157- rbuf. unfilled ( ) . advance ( 4 ) ;
158- }
150+ rbuf. unfilled ( ) . advance ( 4 ) ;
159151
160152 unsafe {
161153 rbuf. unfilled ( ) . set_init ( 2 ) ;
0 commit comments