@@ -197,7 +197,7 @@ impl AsciiStr {
197197 /// assert_eq!("white \tspace \t", example.trim_start());
198198 /// ```
199199 pub fn trim_start ( & self ) -> & Self {
200- & self [ self . chars ( ) . take_while ( |a| a . is_whitespace ( ) ) . count ( ) ..]
200+ & self [ self . chars ( ) . take_while ( |ch| ch . is_whitespace ( ) ) . count ( ) ..]
201201 }
202202
203203 /// Returns an ASCII string slice with trailing whitespace removed.
@@ -209,7 +209,11 @@ impl AsciiStr {
209209 /// assert_eq!(" \twhite \tspace", example.trim_end());
210210 /// ```
211211 pub fn trim_end ( & self ) -> & Self {
212- let trimmed = self . chars ( ) . rev ( ) . take_while ( |a| a. is_whitespace ( ) ) . count ( ) ;
212+ let trimmed = self
213+ . chars ( )
214+ . rev ( )
215+ . take_while ( |ch| ch. is_whitespace ( ) )
216+ . count ( ) ;
213217 & self [ ..self . len ( ) - trimmed]
214218 }
215219
@@ -219,20 +223,20 @@ impl AsciiStr {
219223 && self
220224 . chars ( )
221225 . zip ( other. chars ( ) )
222- . all ( |( a , b ) | a . eq_ignore_ascii_case ( & b ) )
226+ . all ( |( ch , other_ch ) | ch . eq_ignore_ascii_case ( & other_ch ) )
223227 }
224228
225229 /// Replaces lowercase letters with their uppercase equivalent.
226230 pub fn make_ascii_uppercase ( & mut self ) {
227- for a in self . chars_mut ( ) {
228- * a = a . to_ascii_uppercase ( ) ;
231+ for ch in self . chars_mut ( ) {
232+ * ch = ch . to_ascii_uppercase ( ) ;
229233 }
230234 }
231235
232236 /// Replaces uppercase letters with their lowercase equivalent.
233237 pub fn make_ascii_lowercase ( & mut self ) {
234- for a in self . chars_mut ( ) {
235- * a = a . to_ascii_lowercase ( ) ;
238+ for ch in self . chars_mut ( ) {
239+ * ch = ch . to_ascii_lowercase ( ) ;
236240 }
237241 }
238242
@@ -605,7 +609,7 @@ impl<'a> Iterator for Split<'a> {
605609 if !self . ended {
606610 let start: & AsciiStr = self . chars . as_str ( ) ;
607611 let split_on = self . on ;
608- if let Some ( at) = self . chars . position ( |c| c == split_on) {
612+ if let Some ( at) = self . chars . position ( |ch| ch == split_on) {
609613 Some ( & start[ ..at] )
610614 } else {
611615 self . ended = true ;
@@ -621,7 +625,7 @@ impl<'a> DoubleEndedIterator for Split<'a> {
621625 if !self . ended {
622626 let start: & AsciiStr = self . chars . as_str ( ) ;
623627 let split_on = self . on ;
624- if let Some ( at) = self . chars . rposition ( |c| c == split_on) {
628+ if let Some ( at) = self . chars . rposition ( |ch| ch == split_on) {
625629 Some ( & start[ at + 1 ..] )
626630 } else {
627631 self . ended = true ;
0 commit comments