@@ -224,7 +224,7 @@ impl AsciiStr {
224
224
/// A replacement for `AsciiExt::make_ascii_uppercase()`.
225
225
#[ cfg( not( feature = "std" ) ) ]
226
226
pub fn make_ascii_uppercase ( & mut self ) {
227
- for a in & mut self {
227
+ for a in self . chars_mut ( ) {
228
228
* a = a. to_ascii_uppercase ( ) ;
229
229
}
230
230
}
@@ -234,7 +234,7 @@ impl AsciiStr {
234
234
/// A replacement for `AsciiExt::make_ascii_lowercase()`.
235
235
#[ cfg( not( feature = "std" ) ) ]
236
236
pub fn make_ascii_lowercase ( & mut self ) {
237
- for a in & mut self {
237
+ for a in self . chars_mut ( ) {
238
238
* a = a. to_ascii_lowercase ( ) ;
239
239
}
240
240
}
@@ -428,19 +428,19 @@ impl AsciiExt for AsciiStr {
428
428
429
429
fn eq_ignore_ascii_case ( & self , other : & Self ) -> bool {
430
430
self . len ( ) == other. len ( ) &&
431
- self . slice . iter ( ) . zip ( other. slice . iter ( ) ) . all ( |( a, b) | {
431
+ self . chars ( ) . zip ( other. chars ( ) ) . all ( |( a, b) | {
432
432
a. eq_ignore_ascii_case ( b)
433
433
} )
434
434
}
435
435
436
436
fn make_ascii_uppercase ( & mut self ) {
437
- for ascii in & mut self . slice {
437
+ for ascii in self . chars_mut ( ) {
438
438
ascii. make_ascii_uppercase ( ) ;
439
439
}
440
440
}
441
441
442
442
fn make_ascii_lowercase ( & mut self ) {
443
- for ascii in & mut self . slice {
443
+ for ascii in self . chars_mut ( ) {
444
444
ascii. make_ascii_lowercase ( ) ;
445
445
}
446
446
}
0 commit comments