File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2115,7 +2115,7 @@ impl str {
21152115 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
21162116 #[ rustc_diagnostic_item = "str_trim" ]
21172117 pub fn trim ( & self ) -> & str {
2118- self . trim_matches ( | c : char | c . is_whitespace ( ) )
2118+ self . trim_matches ( char:: is_whitespace)
21192119 }
21202120
21212121 /// Returns a string slice with leading whitespace removed.
@@ -2154,7 +2154,7 @@ impl str {
21542154 #[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
21552155 #[ rustc_diagnostic_item = "str_trim_start" ]
21562156 pub fn trim_start ( & self ) -> & str {
2157- self . trim_start_matches ( | c : char | c . is_whitespace ( ) )
2157+ self . trim_start_matches ( char:: is_whitespace)
21582158 }
21592159
21602160 /// Returns a string slice with trailing whitespace removed.
@@ -2193,7 +2193,7 @@ impl str {
21932193 #[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
21942194 #[ rustc_diagnostic_item = "str_trim_end" ]
21952195 pub fn trim_end ( & self ) -> & str {
2196- self . trim_end_matches ( | c : char | c . is_whitespace ( ) )
2196+ self . trim_end_matches ( char:: is_whitespace)
21972197 }
21982198
21992199 /// Returns a string slice with leading whitespace removed.
You can’t perform that action at this time.
0 commit comments