about summary refs log tree commit diff
path: root/src/libstd/old_path
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-25 17:06:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-26 12:10:22 -0700
commit43bfaa4a336095eb5697fb2df50909fd3c72ed14 (patch)
treee10610e1ce9811c89e1291b786d7a49b63ee02d9 /src/libstd/old_path
parent54f16b818b58f6d6e81891b041fc751986e75155 (diff)
downloadrust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.tar.gz
rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.zip
Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
Diffstat (limited to 'src/libstd/old_path')
-rw-r--r--src/libstd/old_path/posix.rs2
-rw-r--r--src/libstd/old_path/windows.rs26
2 files changed, 14 insertions, 14 deletions
diff --git a/src/libstd/old_path/posix.rs b/src/libstd/old_path/posix.rs
index 0ab8612a7cb..67bfe2bd770 100644
--- a/src/libstd/old_path/posix.rs
+++ b/src/libstd/old_path/posix.rs
@@ -37,7 +37,7 @@ pub type StrComponents<'a> =
 #[derive(Clone)]
 pub struct Path {
     repr: Vec<u8>, // assumed to never be empty or contain NULs
-    sepidx: Option<uint> // index of the final separator in repr
+    sepidx: Option<usize> // index of the final separator in repr
 }
 
 /// The standard path separator character
diff --git a/src/libstd/old_path/windows.rs b/src/libstd/old_path/windows.rs
index 4f367e30526..869a8127301 100644
--- a/src/libstd/old_path/windows.rs
+++ b/src/libstd/old_path/windows.rs
@@ -81,7 +81,7 @@ pub type Components<'a> =
 pub struct Path {
     repr: String, // assumed to never be empty
     prefix: Option<PathPrefix>,
-    sepidx: Option<uint> // index of the final separator in the non-prefix portion of repr
+    sepidx: Option<usize> // index of the final separator in the non-prefix portion of repr
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -749,7 +749,7 @@ impl Path {
                     if prefix.is_some() && comps.is_empty() {
                         match prefix.unwrap() {
                             DiskPrefix => {
-                                let len = prefix_len(prefix) + is_abs as uint;
+                                let len = prefix_len(prefix) + is_abs as usize;
                                 let mut s = String::from_str(&s[..len]);
                                 unsafe {
                                     let v = s.as_mut_vec();
@@ -764,7 +764,7 @@ impl Path {
                                 Some(s)
                             }
                             VerbatimDiskPrefix => {
-                                let len = prefix_len(prefix) + is_abs as uint;
+                                let len = prefix_len(prefix) + is_abs as usize;
                                 let mut s = String::from_str(&s[..len]);
                                 unsafe {
                                     let v = s.as_mut_vec();
@@ -838,7 +838,7 @@ impl Path {
         self.sepidx = idx.and_then(|x| if x < prefixlen { None } else { Some(x) });
     }
 
-    fn prefix_len(&self) -> uint {
+    fn prefix_len(&self) -> usize {
         prefix_len(self.prefix)
     }
 
@@ -847,7 +847,7 @@ impl Path {
     // end is the length of the string, normally, or the index of the final character if it is
     // a non-semantic trailing separator in a verbatim string.
     // If the prefix is considered the separator, before and after are the same.
-    fn sepidx_or_prefix_len(&self) -> Option<(uint,uint,uint)> {
+    fn sepidx_or_prefix_len(&self) -> Option<(usize,usize,usize)> {
         match self.sepidx {
             None => match self.prefix_len() { 0 => None, x => Some((x,x,self.repr.len())) },
             Some(x) => {
@@ -973,16 +973,16 @@ pub fn is_sep_byte_verbatim(u: &u8) -> bool {
 /// Prefix types for Path
 #[derive(Copy, PartialEq, Clone, Debug)]
 pub enum PathPrefix {
-    /// Prefix `\\?\`, uint is the length of the following component
-    VerbatimPrefix(uint),
+    /// Prefix `\\?\`, usize is the length of the following component
+    VerbatimPrefix(usize),
     /// Prefix `\\?\UNC\`, uints are the lengths of the UNC components
-    VerbatimUNCPrefix(uint, uint),
+    VerbatimUNCPrefix(usize, usize),
     /// Prefix `\\?\C:\` (for any alphabetic character)
     VerbatimDiskPrefix,
-    /// Prefix `\\.\`, uint is the length of the following component
-    DeviceNSPrefix(uint),
+    /// Prefix `\\.\`, usize is the length of the following component
+    DeviceNSPrefix(usize),
     /// UNC prefix `\\server\share`, uints are the lengths of the server/share
-    UNCPrefix(uint, uint),
+    UNCPrefix(usize, usize),
     /// Prefix `C:` for any alphabetic character
     DiskPrefix
 }
@@ -1037,7 +1037,7 @@ fn parse_prefix<'a>(mut path: &'a str) -> Option<PathPrefix> {
     }
     return None;
 
-    fn parse_two_comps(mut path: &str, f: fn(char) -> bool) -> Option<(uint, uint)> {
+    fn parse_two_comps(mut path: &str, f: fn(char) -> bool) -> Option<(usize, usize)> {
         let idx_a = match path.find(f) {
             None => return None,
             Some(x) => x
@@ -1107,7 +1107,7 @@ fn prefix_is_verbatim(p: Option<PathPrefix>) -> bool {
     }
 }
 
-fn prefix_len(p: Option<PathPrefix>) -> uint {
+fn prefix_len(p: Option<PathPrefix>) -> usize {
     match p {
         None => 0,
         Some(VerbatimPrefix(x)) => 4 + x,