Remove usage of the deprecated std::num::Zero trait.

This commit is contained in:
Simon Sapin 2014-12-18 11:16:47 +00:00
parent 32c721e640
commit 084a63df45
10 changed files with 42 additions and 51 deletions

View file

@ -33,7 +33,6 @@ use servo_util::arc_ptr_eq;
use std::cmp::max;
use std::fmt;
use std::mem;
use std::num;
use std::u16;
use style::computed_values::{text_align, vertical_align, white_space};
use style::ComputedValues;
@ -211,7 +210,7 @@ impl LineBreaker {
/// Reinitializes the pending line to blank data.
fn reset_line(&mut self) {
self.pending_line.range.reset(num::zero(), num::zero());
self.pending_line.range.reset(FragmentIndex(0), FragmentIndex(0));
self.pending_line.bounds = LogicalRect::new(self.floats.writing_mode,
Au(0),
self.cur_b,
@ -632,7 +631,7 @@ impl LineBreaker {
if self.pending_line_is_empty() {
assert!(self.new_fragments.len() <= (u16::MAX as uint));
self.pending_line.range.reset(FragmentIndex(self.new_fragments.len() as int),
num::zero());
FragmentIndex(0));
}
self.pending_line.range.extend_by(FragmentIndex(1));
@ -655,7 +654,7 @@ impl LineBreaker {
/// Returns true if the pending line is empty and false otherwise.
fn pending_line_is_empty(&self) -> bool {
self.pending_line.range.length() == num::zero()
self.pending_line.range.length() == FragmentIndex(0)
}
}