Use usize in flow.rs.

This commit is contained in:
Ms2ger 2015-04-02 14:55:43 +02:00
parent 588143149c
commit 31c6a3977f

View file

@ -394,7 +394,7 @@ pub trait ImmutableFlowUtils {
fn is_leaf(self) -> bool; fn is_leaf(self) -> bool;
/// Returns the number of children that this flow possesses. /// Returns the number of children that this flow possesses.
fn child_count(self) -> uint; fn child_count(self) -> usize;
/// Return true if this flow is a Block Container. /// Return true if this flow is a Block Container.
fn is_block_container(self) -> bool; fn is_block_container(self) -> bool;
@ -561,7 +561,7 @@ static HAS_FLOATED_DESCENDANTS_BITMASK: FlowFlags = FlowFlags { bits: 0b0000_001
/// The number of bits we must shift off to handle the text alignment field. /// The number of bits we must shift off to handle the text alignment field.
/// ///
/// NB: If you update this, update `TEXT_ALIGN` above. /// NB: If you update this, update `TEXT_ALIGN` above.
static TEXT_ALIGN_SHIFT: uint = 11; static TEXT_ALIGN_SHIFT: usize = 11;
impl FlowFlags { impl FlowFlags {
/// Propagates text alignment flags from an appropriate parent flow per CSS 2.1. /// Propagates text alignment flags from an appropriate parent flow per CSS 2.1.
@ -650,7 +650,7 @@ impl Descendants {
} }
} }
pub fn len(&self) -> uint { pub fn len(&self) -> usize {
self.descendant_links.len() self.descendant_links.len()
} }
@ -1152,7 +1152,7 @@ impl<'a> ImmutableFlowUtils for &'a (Flow + 'a) {
} }
/// Returns the number of children that this flow possesses. /// Returns the number of children that this flow possesses.
fn child_count(self) -> uint { fn child_count(self) -> usize {
base(self).children.len() base(self).children.len()
} }