File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3814,7 +3814,8 @@ impl str {
3814
3814
pub fn strip_prefix < ' a , P : Pattern < ' a > > ( & ' a self , prefix : P ) -> Option < & ' a str > {
3815
3815
let mut matcher = prefix. into_searcher ( self ) ;
3816
3816
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") ;
3818
3819
unsafe {
3819
3820
// Searcher is known to return valid indices.
3820
3821
Some ( self . get_unchecked ( len..) )
@@ -3850,7 +3851,8 @@ impl str {
3850
3851
{
3851
3852
let mut matcher = suffix. into_searcher ( self ) ;
3852
3853
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") ;
3854
3856
unsafe {
3855
3857
// Searcher is known to return valid indices.
3856
3858
Some ( self . get_unchecked ( ..start) )
You can’t perform that action at this time.
0 commit comments