diff --git a/src/libstd/base64.rs b/src/libstd/base64.rs index e5eacd5c440bba6a2f323e9ab0a40399a0060bde..995910e635d8ad17792c89b87b5841d4aa8c6c7d 100644 --- a/src/libstd/base64.rs +++ b/src/libstd/base64.rs @@ -2,7 +2,7 @@ #[forbid(deprecated_pattern)]; use io::Reader; -trait ToBase64 { +pub trait ToBase64 { fn to_base64() -> ~str; } @@ -63,7 +63,7 @@ fn to_base64() -> ~str { } } -trait FromBase64 { +pub trait FromBase64 { fn from_base64() -> ~[u8]; } diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs index 9b094f9215c67f34abfaefa9afa189a416060afa..52c50a39f258c2e6fd1e2ce4a44529c6c676b634 100644 --- a/src/libstd/cmp.rs +++ b/src/libstd/cmp.rs @@ -4,7 +4,7 @@ const fuzzy_epsilon: float = 1.0e-6; -trait FuzzyEq { +pub trait FuzzyEq { pure fn fuzzy_eq(other: &self) -> bool; } diff --git a/src/libstd/par.rs b/src/libstd/par.rs index 2f98c4bad3494895c4d4217d2c561f8854cdc10b..a0c9a1b92fed8006282029d4ba3032ff0c07235e 100644 --- a/src/libstd/par.rs +++ b/src/libstd/par.rs @@ -1,6 +1,5 @@ use future_spawn = future::spawn; -export map, mapi, alli, any, mapi_factory; /** * The maximum number of tasks this module will spawn for a single @@ -73,7 +72,7 @@ fn map_slices( } /// A parallel version of map. -fn map(xs: ~[A], f: fn~(A) -> B) -> ~[B] { +pub fn map(xs: ~[A], f: fn~(A) -> B) -> ~[B] { vec::concat(map_slices(xs, || { fn~(_base: uint, slice : &[A], copy f) -> ~[B] { vec::map(slice, |x| f(*x)) @@ -82,7 +81,7 @@ fn map(xs: ~[A], f: fn~(A) -> B) -> ~[B] { } /// A parallel version of mapi. -fn mapi(xs: ~[A], +pub fn mapi(xs: ~[A], f: fn~(uint, A) -> B) -> ~[B] { let slices = map_slices(xs, || { fn~(base: uint, slice : &[A], copy f) -> ~[B] { @@ -103,7 +102,7 @@ fn mapi(xs: ~[A], * In this case, f is a function that creates functions to run over the * inner elements. This is to skirt the need for copy constructors. */ -fn mapi_factory( +pub fn mapi_factory( xs: &[A], f: fn() -> fn~(uint, A) -> B) -> ~[B] { let slices = map_slices(xs, || { let f = f(); @@ -120,7 +119,7 @@ fn mapi_factory( } /// Returns true if the function holds for all elements in the vector. -fn alli(xs: ~[A], f: fn~(uint, A) -> bool) -> bool { +pub fn alli(xs: ~[A], f: fn~(uint, A) -> bool) -> bool { do vec::all(map_slices(xs, || { fn~(base: uint, slice : &[A], copy f) -> bool { vec::alli(slice, |i, x| { @@ -131,7 +130,7 @@ fn alli(xs: ~[A], f: fn~(uint, A) -> bool) -> bool { } /// Returns true if the function holds for any elements in the vector. -fn any(xs: ~[A], f: fn~(A) -> bool) -> bool { +pub fn any(xs: ~[A], f: fn~(A) -> bool) -> bool { do vec::any(map_slices(xs, || { fn~(_base : uint, slice: &[A], copy f) -> bool { vec::any(slice, |x| f(x)) diff --git a/src/libstd/std.rc b/src/libstd/std.rc index c3b7c1793ec3202c543514877da7a9bfab8f029b..2f75ae07c841609dc5b612eda4ad2704b3cccc13 100644 --- a/src/libstd/std.rc +++ b/src/libstd/std.rc @@ -132,11 +132,8 @@ mod prettyprint; mod prettyprint2; #[legacy_exports] mod arena; -#[legacy_exports] mod par; -#[legacy_exports] mod cmp; -#[legacy_exports] mod base64; #[cfg(unicode)]