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 @@ -177,9 +177,9 @@ fn test_join_for_different_lengths_with_long_separator() {
177177
178178#[ test]
179179fn test_unsafe_slice ( ) {
180- assert_eq ! ( "ab" , unsafe { "abc" . slice_unchecked ( 0 , 2 ) } ) ;
181- assert_eq ! ( "bc" , unsafe { "abc" . slice_unchecked ( 1 , 3 ) } ) ;
182- assert_eq ! ( "" , unsafe { "abc" . slice_unchecked ( 1 , 1 ) } ) ;
180+ assert_eq ! ( "ab" , unsafe { "abc" . get_unchecked ( 0 .. 2 ) } ) ;
181+ assert_eq ! ( "bc" , unsafe { "abc" . get_unchecked ( 1 .. 3 ) } ) ;
182+ assert_eq ! ( "" , unsafe { "abc" . get_unchecked ( 1 .. 1 ) } ) ;
183183 fn a_million_letter_a ( ) -> String {
184184 let mut i = 0 ;
185185 let mut rs = String :: new ( ) ;
@@ -200,7 +200,7 @@ fn test_unsafe_slice() {
200200 }
201201 let letters = a_million_letter_a ( ) ;
202202 assert_eq ! ( half_a_million_letter_a( ) ,
203- unsafe { letters. slice_unchecked ( 0 , 500000 ) } ) ;
203+ unsafe { letters. get_unchecked ( 0 .. 500000 ) } ) ;
204204}
205205
206206#[ test]
You can’t perform that action at this time.
0 commit comments