@@ -40,9 +40,7 @@ fn advance_filled() {
40
40
let buf: & mut [ _ ] = & mut [ 0 ; 16 ] ;
41
41
let mut rbuf: BorrowedBuf < ' _ > = buf. into ( ) ;
42
42
43
- unsafe {
44
- rbuf. unfilled ( ) . advance ( 1 ) ;
45
- }
43
+ rbuf. unfilled ( ) . advance ( 1 ) ;
46
44
47
45
assert_eq ! ( rbuf. filled( ) . len( ) , 1 ) ;
48
46
assert_eq ! ( rbuf. unfilled( ) . capacity( ) , 15 ) ;
@@ -53,9 +51,7 @@ fn clear() {
53
51
let buf: & mut [ _ ] = & mut [ 255 ; 16 ] ;
54
52
let mut rbuf: BorrowedBuf < ' _ > = buf. into ( ) ;
55
53
56
- unsafe {
57
- rbuf. unfilled ( ) . advance ( 16 ) ;
58
- }
54
+ rbuf. unfilled ( ) . advance ( 16 ) ;
59
55
60
56
assert_eq ! ( rbuf. filled( ) . len( ) , 16 ) ;
61
57
assert_eq ! ( rbuf. unfilled( ) . capacity( ) , 0 ) ;
@@ -79,9 +75,7 @@ fn set_init() {
79
75
80
76
assert_eq ! ( rbuf. init_len( ) , 8 ) ;
81
77
82
- unsafe {
83
- rbuf. unfilled ( ) . advance ( 4 ) ;
84
- }
78
+ rbuf. unfilled ( ) . advance ( 4 ) ;
85
79
86
80
unsafe {
87
81
rbuf. set_init ( 2 ) ;
@@ -153,9 +147,7 @@ fn cursor_set_init() {
153
147
assert_eq ! ( rbuf. unfilled( ) . uninit_mut( ) . len( ) , 8 ) ;
154
148
assert_eq ! ( unsafe { rbuf. unfilled( ) . as_mut( ) } . len( ) , 16 ) ;
155
149
156
- unsafe {
157
- rbuf. unfilled ( ) . advance ( 4 ) ;
158
- }
150
+ rbuf. unfilled ( ) . advance ( 4 ) ;
159
151
160
152
unsafe {
161
153
rbuf. unfilled ( ) . set_init ( 2 ) ;
0 commit comments