@@ -3829,9 +3829,7 @@ impl str {
3829
3829
j = b;
3830
3830
}
3831
3831
// SAFETY: `Searcher` is known to return valid indices.
3832
- unsafe {
3833
- self . get_unchecked ( i..j)
3834
- }
3832
+ unsafe { self . get_unchecked ( i..j) }
3835
3833
}
3836
3834
3837
3835
/// Returns a string slice with all prefixes that match a pattern
@@ -3868,9 +3866,7 @@ impl str {
3868
3866
i = a;
3869
3867
}
3870
3868
// SAFETY: `Searcher` is known to return valid indices.
3871
- unsafe {
3872
- self . get_unchecked ( i..self . len ( ) )
3873
- }
3869
+ unsafe { self . get_unchecked ( i..self . len ( ) ) }
3874
3870
}
3875
3871
3876
3872
/// Returns a string slice with the prefix removed.
@@ -3902,9 +3898,7 @@ impl str {
3902
3898
must include the first character"
3903
3899
) ;
3904
3900
// SAFETY: `Searcher` is known to return valid indices.
3905
- unsafe {
3906
- Some ( self . get_unchecked ( len..) )
3907
- }
3901
+ unsafe { Some ( self . get_unchecked ( len..) ) }
3908
3902
} else {
3909
3903
None
3910
3904
}
@@ -3943,9 +3937,7 @@ impl str {
3943
3937
must include the last character"
3944
3938
) ;
3945
3939
// SAFETY: `Searcher` is known to return valid indices.
3946
- unsafe {
3947
- Some ( self . get_unchecked ( ..start) )
3948
- }
3940
+ unsafe { Some ( self . get_unchecked ( ..start) ) }
3949
3941
} else {
3950
3942
None
3951
3943
}
@@ -3994,9 +3986,7 @@ impl str {
3994
3986
j = b;
3995
3987
}
3996
3988
// SAFETY: `Searcher` is known to return valid indices.
3997
- unsafe {
3998
- self . get_unchecked ( 0 ..j)
3999
- }
3989
+ unsafe { self . get_unchecked ( 0 ..j) }
4000
3990
}
4001
3991
4002
3992
/// Returns a string slice with all prefixes that match a pattern
0 commit comments