about summary refs log tree commit diff
path: root/src/libstd/path
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-23 20:26:58 +0000
committerbors <bors@rust-lang.org>2014-11-23 20:26:58 +0000
commit4e5259503cd8aac9905c7ac6d68d0c4caab1d28c (patch)
tree9d93d055fa5aa82480c4b5771aba4cca5efdfc9b /src/libstd/path
parent220b99b148559e8996a1dbd279e8ca190bf94b2e (diff)
parentd6b023a46750d6c2df919908bd0f1460d3d9c8a6 (diff)
downloadrust-4e5259503cd8aac9905c7ac6d68d0c4caab1d28c.tar.gz
rust-4e5259503cd8aac9905c7ac6d68d0c4caab1d28c.zip
auto merge of #19242 : jakub-/rust/roll-up, r=jakub-
Diffstat (limited to 'src/libstd/path')
-rw-r--r--src/libstd/path/windows.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs
index f31ffdab17b..9f81de72980 100644
--- a/src/libstd/path/windows.rs
+++ b/src/libstd/path/windows.rs
@@ -235,10 +235,10 @@ impl GenericPathUnsafe for Path {
             let repr = me.repr.as_slice();
             match me.prefix {
                 Some(DiskPrefix) => {
-                    repr.as_bytes()[0] == path.as_bytes()[0].to_ascii().to_uppercase().to_byte()
+                    repr.as_bytes()[0] == path.as_bytes()[0].to_ascii().to_uppercase().as_byte()
                 }
                 Some(VerbatimDiskPrefix) => {
-                    repr.as_bytes()[4] == path.as_bytes()[0].to_ascii().to_uppercase().to_byte()
+                    repr.as_bytes()[4] == path.as_bytes()[0].to_ascii().to_uppercase().as_byte()
                 }
                 _ => false
             }
@@ -673,14 +673,17 @@ impl Path {
         match (self.prefix, other.prefix) {
             (Some(DiskPrefix), Some(VerbatimDiskPrefix)) => {
                 self.is_absolute() &&
-                    s_repr.as_bytes()[0].to_ascii().eq_ignore_case(o_repr.as_bytes()[4].to_ascii())
+                    s_repr.as_bytes()[0].to_ascii().to_lowercase() ==
+                        o_repr.as_bytes()[4].to_ascii().to_lowercase()
             }
             (Some(VerbatimDiskPrefix), Some(DiskPrefix)) => {
                 other.is_absolute() &&
-                    s_repr.as_bytes()[4].to_ascii().eq_ignore_case(o_repr.as_bytes()[0].to_ascii())
+                    s_repr.as_bytes()[4].to_ascii().to_lowercase() ==
+                        o_repr.as_bytes()[0].to_ascii().to_lowercase()
             }
             (Some(VerbatimDiskPrefix), Some(VerbatimDiskPrefix)) => {
-                s_repr.as_bytes()[4].to_ascii().eq_ignore_case(o_repr.as_bytes()[4].to_ascii())
+                s_repr.as_bytes()[4].to_ascii().to_lowercase() ==
+                    o_repr.as_bytes()[4].to_ascii().to_lowercase()
             }
             (Some(UNCPrefix(_,_)), Some(VerbatimUNCPrefix(_,_))) => {
                 s_repr.slice(2, self.prefix_len()) == o_repr.slice(8, other.prefix_len())
@@ -747,10 +750,7 @@ impl Path {
                                 let mut s = String::from_str(s.slice_to(len));
                                 unsafe {
                                     let v = s.as_mut_vec();
-                                    v[0] = (*v)[0]
-                                                     .to_ascii()
-                                                     .to_uppercase()
-                                                     .to_byte();
+                                    v[0] = (*v)[0].to_ascii().to_uppercase().as_byte();
                                 }
                                 if is_abs {
                                     // normalize C:/ to C:\
@@ -765,7 +765,7 @@ impl Path {
                                 let mut s = String::from_str(s.slice_to(len));
                                 unsafe {
                                     let v = s.as_mut_vec();
-                                    v[4] = (*v)[4].to_ascii().to_uppercase().to_byte();
+                                    v[4] = (*v)[4].to_ascii().to_uppercase().as_byte();
                                 }
                                 Some(s)
                             }
@@ -787,13 +787,13 @@ impl Path {
                         match prefix {
                             Some(DiskPrefix) => {
                                 s.push(prefix_.as_bytes()[0].to_ascii()
-                                                   .to_uppercase().to_char());
+                                                   .to_uppercase().as_char());
                                 s.push(':');
                             }
                             Some(VerbatimDiskPrefix) => {
                                 s.push_str(prefix_.slice_to(4));
                                 s.push(prefix_.as_bytes()[4].to_ascii()
-                                                   .to_uppercase().to_char());
+                                                   .to_uppercase().as_char());
                                 s.push_str(prefix_.slice_from(5));
                             }
                             Some(UNCPrefix(a,b)) => {