1
Fork 0

Mass rename uint/int to usize/isize

Now that support has been removed, all lingering use cases are renamed.
This commit is contained in:
Alex Crichton 2015-03-25 17:06:52 -07:00
parent 54f16b818b
commit 43bfaa4a33
1391 changed files with 5180 additions and 5238 deletions

View file

@ -185,7 +185,7 @@ fn stripped_filtered_line<'a>(s: &'a str) -> Option<&'a str> {
}
}
thread_local!(static USED_HEADER_MAP: RefCell<HashMap<String, uint>> = {
thread_local!(static USED_HEADER_MAP: RefCell<HashMap<String, usize>> = {
RefCell::new(HashMap::new())
});

View file

@ -498,7 +498,7 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> io::Result<String> {
try!(write!(&mut w, ","));
}
try!(write!(&mut w, r#"[{},"{}","{}",{}"#,
item.ty as uint, item.name, path,
item.ty as usize, item.name, path,
item.desc.to_json().to_string()));
match item.parent {
Some(nodeid) => {
@ -522,7 +522,7 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> io::Result<String> {
try!(write!(&mut w, ","));
}
try!(write!(&mut w, r#"[{},"{}"]"#,
short as uint, *fqp.last().unwrap()));
short as usize, *fqp.last().unwrap()));
}
try!(write!(&mut w, "]}};"));
@ -1572,7 +1572,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
let mut indices = (0..items.len()).filter(|i| {
!cx.ignore_private_item(&items[*i])
}).collect::<Vec<uint>>();
}).collect::<Vec<usize>>();
// the order of item types in the listing
fn reorder(ty: ItemType) -> u8 {
@ -1593,7 +1593,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
}
}
fn cmp(i1: &clean::Item, i2: &clean::Item, idx1: uint, idx2: uint) -> Ordering {
fn cmp(i1: &clean::Item, i2: &clean::Item, idx1: usize, idx2: usize) -> Ordering {
let ty1 = shortty(i1);
let ty2 = shortty(i2);
if ty1 == ty2 {

View file

@ -33,7 +33,7 @@ pub struct Toc {
}
impl Toc {
fn count_entries_with_level(&self, level: u32) -> uint {
fn count_entries_with_level(&self, level: u32) -> usize {
self.entries.iter().filter(|e| e.level == level).count()
}
}