File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2115,7 +2115,7 @@ impl str {
2115
2115
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2116
2116
#[ rustc_diagnostic_item = "str_trim" ]
2117
2117
pub fn trim ( & self ) -> & str {
2118
- self . trim_matches ( | c : char | c . is_whitespace ( ) )
2118
+ self . trim_matches ( char:: is_whitespace)
2119
2119
}
2120
2120
2121
2121
/// Returns a string slice with leading whitespace removed.
@@ -2154,7 +2154,7 @@ impl str {
2154
2154
#[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
2155
2155
#[ rustc_diagnostic_item = "str_trim_start" ]
2156
2156
pub fn trim_start ( & self ) -> & str {
2157
- self . trim_start_matches ( | c : char | c . is_whitespace ( ) )
2157
+ self . trim_start_matches ( char:: is_whitespace)
2158
2158
}
2159
2159
2160
2160
/// Returns a string slice with trailing whitespace removed.
@@ -2193,7 +2193,7 @@ impl str {
2193
2193
#[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
2194
2194
#[ rustc_diagnostic_item = "str_trim_end" ]
2195
2195
pub fn trim_end ( & self ) -> & str {
2196
- self . trim_end_matches ( | c : char | c . is_whitespace ( ) )
2196
+ self . trim_end_matches ( char:: is_whitespace)
2197
2197
}
2198
2198
2199
2199
/// Returns a string slice with leading whitespace removed.
You can’t perform that action at this time.
0 commit comments