@@ -205,7 +205,7 @@ impl AsciiStr {
205
205
/// assert_eq!("white \tspace \t", example.trim_start());
206
206
/// ```
207
207
pub fn trim_start ( & self ) -> & Self {
208
- & self [ self . chars ( ) . take_while ( |a| a . is_whitespace ( ) ) . count ( ) ..]
208
+ & self [ self . chars ( ) . take_while ( |ch| ch . is_whitespace ( ) ) . count ( ) ..]
209
209
}
210
210
211
211
/// Returns an ASCII string slice with trailing whitespace removed.
@@ -217,7 +217,11 @@ impl AsciiStr {
217
217
/// assert_eq!(" \twhite \tspace", example.trim_end());
218
218
/// ```
219
219
pub fn trim_end ( & self ) -> & Self {
220
- let trimmed = self . chars ( ) . rev ( ) . take_while ( |a| a. is_whitespace ( ) ) . count ( ) ;
220
+ let trimmed = self
221
+ . chars ( )
222
+ . rev ( )
223
+ . take_while ( |ch| ch. is_whitespace ( ) )
224
+ . count ( ) ;
221
225
& self [ ..self . len ( ) - trimmed]
222
226
}
223
227
@@ -227,20 +231,20 @@ impl AsciiStr {
227
231
&& self
228
232
. chars ( )
229
233
. zip ( other. chars ( ) )
230
- . all ( |( a , b ) | a . eq_ignore_ascii_case ( & b ) )
234
+ . all ( |( ch , other_ch ) | ch . eq_ignore_ascii_case ( & other_ch ) )
231
235
}
232
236
233
237
/// Replaces lowercase letters with their uppercase equivalent.
234
238
pub fn make_ascii_uppercase ( & mut self ) {
235
- for a in self . chars_mut ( ) {
236
- * a = a . to_ascii_uppercase ( ) ;
239
+ for ch in self . chars_mut ( ) {
240
+ * ch = ch . to_ascii_uppercase ( ) ;
237
241
}
238
242
}
239
243
240
244
/// Replaces uppercase letters with their lowercase equivalent.
241
245
pub fn make_ascii_lowercase ( & mut self ) {
242
- for a in self . chars_mut ( ) {
243
- * a = a . to_ascii_lowercase ( ) ;
246
+ for ch in self . chars_mut ( ) {
247
+ * ch = ch . to_ascii_lowercase ( ) ;
244
248
}
245
249
}
246
250
@@ -613,7 +617,7 @@ impl<'a> Iterator for Split<'a> {
613
617
if !self . ended {
614
618
let start: & AsciiStr = self . chars . as_str ( ) ;
615
619
let split_on = self . on ;
616
- if let Some ( at) = self . chars . position ( |c| c == split_on) {
620
+ if let Some ( at) = self . chars . position ( |ch| ch == split_on) {
617
621
Some ( & start[ ..at] )
618
622
} else {
619
623
self . ended = true ;
@@ -629,7 +633,7 @@ impl<'a> DoubleEndedIterator for Split<'a> {
629
633
if !self . ended {
630
634
let start: & AsciiStr = self . chars . as_str ( ) ;
631
635
let split_on = self . on ;
632
- if let Some ( at) = self . chars . rposition ( |c| c == split_on) {
636
+ if let Some ( at) = self . chars . rposition ( |ch| ch == split_on) {
633
637
Some ( & start[ at + 1 ..] )
634
638
} else {
635
639
self . ended = true ;
0 commit comments