Skip to content

Commit 1845cf2

Browse files
committed
De-export std::{base64,cmp,par}. Part of #3583.
1 parent 8c89e4b commit 1845cf2

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

src/libstd/base64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#[forbid(deprecated_pattern)];
33
use io::Reader;
44

5-
trait ToBase64 {
5+
pub trait ToBase64 {
66
fn to_base64() -> ~str;
77
}
88

@@ -63,7 +63,7 @@ impl &str: ToBase64 {
6363
}
6464
}
6565

66-
trait FromBase64 {
66+
pub trait FromBase64 {
6767
fn from_base64() -> ~[u8];
6868
}
6969

src/libstd/cmp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
const fuzzy_epsilon: float = 1.0e-6;
66

7-
trait FuzzyEq {
7+
pub trait FuzzyEq {
88
pure fn fuzzy_eq(other: &self) -> bool;
99
}
1010

src/libstd/par.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use future_spawn = future::spawn;
22

3-
export map, mapi, alli, any, mapi_factory;
43

54
/**
65
* The maximum number of tasks this module will spawn for a single
@@ -73,7 +72,7 @@ fn map_slices<A: Copy Send, B: Copy Send>(
7372
}
7473

7574
/// A parallel version of map.
76-
fn map<A: Copy Send, B: Copy Send>(xs: ~[A], f: fn~(A) -> B) -> ~[B] {
75+
pub fn map<A: Copy Send, B: Copy Send>(xs: ~[A], f: fn~(A) -> B) -> ~[B] {
7776
vec::concat(map_slices(xs, || {
7877
fn~(_base: uint, slice : &[A], copy f) -> ~[B] {
7978
vec::map(slice, |x| f(*x))
@@ -82,7 +81,7 @@ fn map<A: Copy Send, B: Copy Send>(xs: ~[A], f: fn~(A) -> B) -> ~[B] {
8281
}
8382

8483
/// A parallel version of mapi.
85-
fn mapi<A: Copy Send, B: Copy Send>(xs: ~[A],
84+
pub fn mapi<A: Copy Send, B: Copy Send>(xs: ~[A],
8685
f: fn~(uint, A) -> B) -> ~[B] {
8786
let slices = map_slices(xs, || {
8887
fn~(base: uint, slice : &[A], copy f) -> ~[B] {
@@ -103,7 +102,7 @@ fn mapi<A: Copy Send, B: Copy Send>(xs: ~[A],
103102
* In this case, f is a function that creates functions to run over the
104103
* inner elements. This is to skirt the need for copy constructors.
105104
*/
106-
fn mapi_factory<A: Copy Send, B: Copy Send>(
105+
pub fn mapi_factory<A: Copy Send, B: Copy Send>(
107106
xs: &[A], f: fn() -> fn~(uint, A) -> B) -> ~[B] {
108107
let slices = map_slices(xs, || {
109108
let f = f();
@@ -120,7 +119,7 @@ fn mapi_factory<A: Copy Send, B: Copy Send>(
120119
}
121120

122121
/// Returns true if the function holds for all elements in the vector.
123-
fn alli<A: Copy Send>(xs: ~[A], f: fn~(uint, A) -> bool) -> bool {
122+
pub fn alli<A: Copy Send>(xs: ~[A], f: fn~(uint, A) -> bool) -> bool {
124123
do vec::all(map_slices(xs, || {
125124
fn~(base: uint, slice : &[A], copy f) -> bool {
126125
vec::alli(slice, |i, x| {
@@ -131,7 +130,7 @@ fn alli<A: Copy Send>(xs: ~[A], f: fn~(uint, A) -> bool) -> bool {
131130
}
132131

133132
/// Returns true if the function holds for any elements in the vector.
134-
fn any<A: Copy Send>(xs: ~[A], f: fn~(A) -> bool) -> bool {
133+
pub fn any<A: Copy Send>(xs: ~[A], f: fn~(A) -> bool) -> bool {
135134
do vec::any(map_slices(xs, || {
136135
fn~(_base : uint, slice: &[A], copy f) -> bool {
137136
vec::any(slice, |x| f(x))

src/libstd/std.rc

-3
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,8 @@ mod prettyprint;
132132
mod prettyprint2;
133133
#[legacy_exports]
134134
mod arena;
135-
#[legacy_exports]
136135
mod par;
137-
#[legacy_exports]
138136
mod cmp;
139-
#[legacy_exports]
140137
mod base64;
141138

142139
#[cfg(unicode)]

0 commit comments

Comments
 (0)