Skip to content

Commit 0a148c8

Browse files
committed
Import std::num::NumCast explicitly.
It was removed from the prelude as part of <rust-lang/rust#18827>.
1 parent e5e7491 commit 0a148c8

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/length.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
use scale_factor::ScaleFactor;
1212

13-
use std::num::{cast, Zero};
13+
use std::num::{NumCast, cast, Zero};
1414

1515
/// A one-dimensional distance, with value represented by `T` and unit of measurement `Unit`.
1616
///

src/point.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use length::Length;
1111
use size::Size2D;
1212

1313
use std::fmt;
14-
use std::num::Zero;
14+
use std::num::{NumCast, Zero};
1515

1616
#[deriving(Clone, Decodable, Encodable, Eq, Hash, PartialEq)]
1717
pub struct Point2D<T> {

src/rect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use point::Point2D;
1313
use size::Size2D;
1414
use std::cmp::{PartialEq, PartialOrd};
1515
use std::fmt;
16-
use std::num::Zero;
16+
use std::num::{NumCast, Zero};
1717

1818
#[deriving(Clone, Decodable, Encodable, PartialEq)]
1919
pub struct Rect<T> {

src/scale_factor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// except according to those terms.
99
//! A type-checked scaling factor between units.
1010
11-
use std::num::{cast, One};
11+
use std::num::{NumCast, cast, One};
1212

1313
/// A scaling factor between two different units of measurement.
1414
///

src/side_offsets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! A group of side offsets, which correspond to top/left/bottom/right for borders, padding,
1111
//! and margins in CSS.
1212
13-
use std::num::Zero;
13+
use std::num::{NumCast, Zero};
1414

1515
/// A group of side offsets, which correspond to top/left/bottom/right for borders, padding,
1616
/// and margins in CSS.

src/size.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use length::Length;
1111

1212
use std::cmp::PartialEq;
1313
use std::fmt;
14-
use std::num::Zero;
14+
use std::num::{NumCast, Zero};
1515

1616
#[deriving(Clone, Decodable, Encodable, PartialEq)]
1717
pub struct Size2D<T> {

0 commit comments

Comments
 (0)