Skip to content

Commit e998958

Browse files
committed
Update ascii functions used elsewhere
1 parent f7ccae5 commit e998958

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/compiletest/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
819819
let i = s.chars();
820820
let c : Vec<char> = i.map( |c| {
821821
if c.is_ascii() {
822-
c.to_ascii().to_lower().to_char()
822+
c.to_ascii().to_lowercase().to_char()
823823
} else {
824824
c
825825
}

src/libglob/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -553,18 +553,18 @@ fn in_char_specifiers(specifiers: &[CharSpecifier], c: char, options: MatchOptio
553553
// FIXME: work with non-ascii chars properly (issue #1347)
554554
if !options.case_sensitive && c.is_ascii() && start.is_ascii() && end.is_ascii() {
555555

556-
let start = start.to_ascii().to_lower();
557-
let end = end.to_ascii().to_lower();
556+
let start = start.to_ascii().to_lowercase();
557+
let end = end.to_ascii().to_lowercase();
558558

559-
let start_up = start.to_upper();
560-
let end_up = end.to_upper();
559+
let start_up = start.to_uppercase();
560+
let end_up = end.to_uppercase();
561561

562562
// only allow case insensitive matching when
563563
// both start and end are within a-z or A-Z
564564
if start != start_up && end != end_up {
565565
let start = start.to_char();
566566
let end = end.to_char();
567-
let c = c.to_ascii().to_lower().to_char();
567+
let c = c.to_ascii().to_lowercase().to_char();
568568
if c >= start && c <= end {
569569
return true;
570570
}

0 commit comments

Comments
 (0)