File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3814,7 +3814,8 @@ impl str {
38143814 pub fn strip_prefix < ' a , P : Pattern < ' a > > ( & ' a self , prefix : P ) -> Option < & ' a str > {
38153815 let mut matcher = prefix. into_searcher ( self ) ;
38163816 if let SearchStep :: Match ( start, len) = matcher. next ( ) {
3817- debug_assert_eq ! ( start, 0 , "The first search step from Searcher must start from the front" ) ;
3817+ debug_assert_eq ! ( start, 0 , "The first search step from Searcher \
3818+ must include the first character") ;
38183819 unsafe {
38193820 // Searcher is known to return valid indices.
38203821 Some ( self . get_unchecked ( len..) )
@@ -3850,7 +3851,8 @@ impl str {
38503851 {
38513852 let mut matcher = suffix. into_searcher ( self ) ;
38523853 if let SearchStep :: Match ( start, end) = matcher. next_back ( ) {
3853- debug_assert_eq ! ( end, self . len( ) , "The first search step from ReverseSearcher must include the last character" ) ;
3854+ debug_assert_eq ! ( end, self . len( ) , "The first search step from ReverseSearcher \
3855+ must include the last character") ;
38543856 unsafe {
38553857 // Searcher is known to return valid indices.
38563858 Some ( self . get_unchecked ( ..start) )
You can’t perform that action at this time.
0 commit comments