diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs index 8d25f7007f5..400f8693231 100644 --- a/components/layout/css/matching.rs +++ b/components/layout/css/matching.rs @@ -122,7 +122,7 @@ impl<'a> PartialEq for ApplicableDeclarationsC impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> { fn hash(&self, state: &mut H) { for declaration in self.declarations.iter() { - let ptr: uint = unsafe { + let ptr: usize = unsafe { mem::transmute_copy(declaration) }; ptr.hash(state); @@ -130,7 +130,7 @@ impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> { } } -static APPLICABLE_DECLARATIONS_CACHE_SIZE: uint = 32; +static APPLICABLE_DECLARATIONS_CACHE_SIZE: usize = 32; pub struct ApplicableDeclarationsCache { cache: SimpleHashCache>, @@ -331,7 +331,7 @@ impl StyleSharingCandidate { } } -static STYLE_SHARING_CANDIDATE_CACHE_SIZE: uint = 40; +static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 40; impl StyleSharingCandidateCache { pub fn new() -> StyleSharingCandidateCache { @@ -351,7 +351,7 @@ impl StyleSharingCandidateCache { } } - pub fn touch(&mut self, index: uint) { + pub fn touch(&mut self, index: usize) { self.cache.touch(index) } } @@ -363,7 +363,7 @@ pub enum StyleSharingResult { CannotShare(bool), /// The node's style can be shared. The integer specifies the index in the LRU cache that was /// hit and the damage that was done. - StyleWasShared(uint, RestyleDamage), + StyleWasShared(usize, RestyleDamage), } pub trait MatchMethods { diff --git a/components/layout/floats.rs b/components/layout/floats.rs index 9c83322c1c7..736b311bd57 100644 --- a/components/layout/floats.rs +++ b/components/layout/floats.rs @@ -153,7 +153,7 @@ impl Floats { } } - pub fn len(&self) -> uint { + pub fn len(&self) -> usize { self.list.floats.len() } diff --git a/components/layout/flow_list.rs b/components/layout/flow_list.rs index 20c69b6081c..ea11b545dac 100644 --- a/components/layout/flow_list.rs +++ b/components/layout/flow_list.rs @@ -102,7 +102,7 @@ impl FlowList { /// O(1) #[inline] - pub fn len(&self) -> uint { + pub fn len(&self) -> usize { self.flows.len() } } @@ -115,7 +115,7 @@ impl<'a> Iterator for FlowListIterator<'a> { } #[inline] - fn size_hint(&self) -> (uint, Option) { + fn size_hint(&self) -> (usize, Option) { self.it.size_hint() } } @@ -128,7 +128,7 @@ impl<'a> Iterator for MutFlowListIterator<'a> { } #[inline] - fn size_hint(&self) -> (uint, Option) { + fn size_hint(&self) -> (usize, Option) { self.it.size_hint() } } diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index ee076763c24..57b74ac66e4 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -35,7 +35,7 @@ fn static_assertion(node: UnsafeLayoutNode) { } /// Vtable + pointer representation of a Flow trait object. -pub type UnsafeFlow = (uint, uint); +pub type UnsafeFlow = (usize, usize); fn null_unsafe_flow() -> UnsafeFlow { (0, 0)