@@ -40,7 +40,7 @@ fn advance_filled() {
4040 let buf: & mut [ _ ] = & mut [ 0 ; 16 ] ;
4141 let mut rbuf: BorrowedBuf < ' _ > = buf. into ( ) ;
4242
43- rbuf. unfilled ( ) . advance ( 1 ) ;
43+ rbuf. unfilled ( ) . advance_checked ( 1 ) ;
4444
4545 assert_eq ! ( rbuf. filled( ) . len( ) , 1 ) ;
4646 assert_eq ! ( rbuf. unfilled( ) . capacity( ) , 15 ) ;
@@ -51,7 +51,7 @@ fn clear() {
5151 let buf: & mut [ _ ] = & mut [ 255 ; 16 ] ;
5252 let mut rbuf: BorrowedBuf < ' _ > = buf. into ( ) ;
5353
54- rbuf. unfilled ( ) . advance ( 16 ) ;
54+ rbuf. unfilled ( ) . advance_checked ( 16 ) ;
5555
5656 assert_eq ! ( rbuf. filled( ) . len( ) , 16 ) ;
5757 assert_eq ! ( rbuf. unfilled( ) . capacity( ) , 0 ) ;
@@ -131,7 +131,7 @@ fn cursor_set_init() {
131131 assert ! ( cursor. is_init( ) ) ;
132132 assert_eq ! ( unsafe { cursor. as_mut( ) . len( ) } , 16 ) ;
133133
134- cursor. advance ( 4 ) ;
134+ cursor. advance_checked ( 4 ) ;
135135
136136 assert_eq ! ( unsafe { cursor. as_mut( ) . len( ) } , 12 ) ;
137137
@@ -157,7 +157,7 @@ fn cursor_with_unfilled_buf() {
157157 assert ! ( !buf. is_init( ) ) ;
158158
159159 buf. unfilled ( ) . ensure_init ( ) ;
160- buf. unfilled ( ) . advance ( 4 ) ;
160+ buf. unfilled ( ) . advance_checked ( 4 ) ;
161161 } ) ;
162162
163163 assert ! ( cursor. is_init( ) ) ;
0 commit comments