Skip to content

Commit e7ef82d

Browse files
committed
Change some uses of static methods to use the trait path
1 parent 732c39c commit e7ef82d

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

src/libcore/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub use f64::{modf, pow, round, sinh, tanh, tgamma, trunc};
3636
pub use f64::signbit;
3737
pub use f64::{j0, j1, jn, y0, y1, yn};
3838
use cmp::{Eq, Ord};
39-
use num::from_int;
39+
use num::Num::from_int;
4040

4141
pub const NaN: float = 0.0/0.0;
4242

src/libcore/int-template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use T = self::inst::T;
2020

2121
use cmp::{Eq, Ord};
2222
use from_str::FromStr;
23-
use num::from_int;
23+
use num::Num::from_int;
2424

2525
pub const bits : uint = inst::bits;
2626
pub const bytes : uint = (inst::bits / 8);

src/libcore/iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ pub pure fn find<A: Copy,IA:BaseIter<A>>(self: &IA,
244244
#[inline(always)]
245245
pub pure fn build<A,B: Buildable<A>>(builder: fn(push: pure fn(v: A)))
246246
-> B {
247-
build_sized(4, builder)
247+
Buildable::build_sized(4, builder)
248248
}
249249

250250
/**
@@ -265,7 +265,7 @@ pub pure fn build_sized_opt<A,B: Buildable<A>>(
265265
size: Option<uint>,
266266
builder: fn(push: pure fn(v: A))) -> B {
267267

268-
build_sized(size.get_default(4), builder)
268+
Buildable::build_sized(size.get_default(4), builder)
269269
}
270270

271271
// Functions that combine iteration and building
@@ -288,7 +288,7 @@ pub fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: &IT, f: fn(&T) -> U)
288288
*/
289289
pub pure fn from_fn<T,BT: Buildable<T>>(n_elts: uint,
290290
op: InitOp<T>) -> BT {
291-
do build_sized(n_elts) |push| {
291+
do Buildable::build_sized(n_elts) |push| {
292292
let mut i: uint = 0u;
293293
while i < n_elts { push(op(i)); i += 1u; }
294294
}
@@ -302,7 +302,7 @@ pub pure fn from_fn<T,BT: Buildable<T>>(n_elts: uint,
302302
*/
303303
pub pure fn from_elem<T: Copy,BT: Buildable<T>>(n_elts: uint,
304304
t: T) -> BT {
305-
do build_sized(n_elts) |push| {
305+
do Buildable::build_sized(n_elts) |push| {
306306
let mut i: uint = 0;
307307
while i < n_elts { push(t); i += 1; }
308308
}

src/libcore/path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub struct WindowsPath {
2929
}
3030

3131
pub pure fn WindowsPath(s: &str) -> WindowsPath {
32-
from_str(s)
32+
GenericPath::from_str(s)
3333
}
3434

3535
#[deriving_eq]
@@ -39,7 +39,7 @@ pub struct PosixPath {
3939
}
4040

4141
pub pure fn PosixPath(s: &str) -> PosixPath {
42-
from_str(s)
42+
GenericPath::from_str(s)
4343
}
4444

4545
pub trait GenericPath {

src/libstd/workcache.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ use either::{Right,Left,Either};
1616
use json;
1717
use sha1;
1818
use serialization::{Serializer,Serializable,
19-
Deserializer,Deserializable,
20-
deserialize};
19+
Deserializer,Deserializable};
2120

2221
/**
2322
*
@@ -261,7 +260,7 @@ impl Prep {
261260

262261
let v : T = do io::with_str_reader(res) |rdr| {
263262
let j = result::unwrap(json::from_reader(rdr));
264-
deserialize(&json::Deserializer(move j))
263+
Deserializable::deserialize(&json::Deserializer(move j))
265264
};
266265
return Work::new(self, move Left(move v));
267266
}

0 commit comments

Comments
 (0)