about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-08-13 07:26:23 -0700
committerbors <bors@rust-lang.org>2013-08-13 07:26:23 -0700
commit0d817ee869387322dec4d3f7d407dcc9f91c2632 (patch)
tree958140150cb50faae2b56a21bf4759261ec306d2 /src/libstd
parentf02cc6bf0a276115a31354b1c1530e6fe9eb4d58 (diff)
parent930885d5e5f817e3d7609f93d5ba89b1abebfaf4 (diff)
downloadrust-0d817ee869387322dec4d3f7d407dcc9f91c2632.tar.gz
rust-0d817ee869387322dec4d3f7d407dcc9f91c2632.zip
auto merge of #8423 : alexcrichton/rust/less-priv-again, r=bstrie
Closes #5495
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/num/num.rs4
-rw-r--r--src/libstd/ptr.rs8
-rw-r--r--src/libstd/rand.rs4
-rw-r--r--src/libstd/rt/io/comm_adapters.rs4
-rw-r--r--src/libstd/rt/uv/mod.rs12
-rw-r--r--src/libstd/str.rs12
-rw-r--r--src/libstd/vec.rs16
7 files changed, 30 insertions, 30 deletions
diff --git a/src/libstd/num/num.rs b/src/libstd/num/num.rs
index 3af1666b4da..9e72b355bf9 100644
--- a/src/libstd/num/num.rs
+++ b/src/libstd/num/num.rs
@@ -414,11 +414,11 @@ impl_num_cast!(f64,   to_f64)
 impl_num_cast!(float, to_float)
 
 pub trait ToStrRadix {
-    pub fn to_str_radix(&self, radix: uint) -> ~str;
+    fn to_str_radix(&self, radix: uint) -> ~str;
 }
 
 pub trait FromStrRadix {
-    pub fn from_str_radix(str: &str, radix: uint) -> Option<Self>;
+    fn from_str_radix(str: &str, radix: uint) -> Option<Self>;
 }
 
 /// Calculates a power to a given radix, optimized for uint `pow` and `radix`.
diff --git a/src/libstd/ptr.rs b/src/libstd/ptr.rs
index 96f3e480617..b13d46d540d 100644
--- a/src/libstd/ptr.rs
+++ b/src/libstd/ptr.rs
@@ -394,7 +394,7 @@ impl<T, I: Int> Add<I, *T> for *T {
     /// Add an integer value to a pointer to get an offset pointer.
     /// Is calculated according to the size of the type pointed to.
     #[inline]
-    pub fn add(&self, rhs: &I) -> *T {
+    fn add(&self, rhs: &I) -> *T {
         self.offset(rhs.to_int() as int)
     }
 }
@@ -404,7 +404,7 @@ impl<T, I: Int> Sub<I, *T> for *T {
     /// Subtract an integer value from a pointer to get an offset pointer.
     /// Is calculated according to the size of the type pointed to.
     #[inline]
-    pub fn sub(&self, rhs: &I) -> *T {
+    fn sub(&self, rhs: &I) -> *T {
         self.offset(-rhs.to_int() as int)
     }
 }
@@ -414,7 +414,7 @@ impl<T, I: Int> Add<I, *mut T> for *mut T {
     /// Add an integer value to a pointer to get an offset pointer.
     /// Is calculated according to the size of the type pointed to.
     #[inline]
-    pub fn add(&self, rhs: &I) -> *mut T {
+    fn add(&self, rhs: &I) -> *mut T {
         self.offset(rhs.to_int() as int)
     }
 }
@@ -424,7 +424,7 @@ impl<T, I: Int> Sub<I, *mut T> for *mut T {
     /// Subtract an integer value from a pointer to get an offset pointer.
     /// Is calculated according to the size of the type pointed to.
     #[inline]
-    pub fn sub(&self, rhs: &I) -> *mut T {
+    fn sub(&self, rhs: &I) -> *mut T {
         self.offset(-rhs.to_int() as int)
     }
 }
diff --git a/src/libstd/rand.rs b/src/libstd/rand.rs
index 5f8fa9fddbc..500278fddb0 100644
--- a/src/libstd/rand.rs
+++ b/src/libstd/rand.rs
@@ -260,7 +260,7 @@ pub mod rustrt {
 /// A random number generator
 pub trait Rng {
     /// Return the next random integer
-    pub fn next(&mut self) -> u32;
+    fn next(&mut self) -> u32;
 }
 
 /// A value with a particular weight compared to other values
@@ -825,7 +825,7 @@ pub struct XorShiftRng {
 
 impl Rng for XorShiftRng {
     #[inline]
-    pub fn next(&mut self) -> u32 {
+    fn next(&mut self) -> u32 {
         let x = self.x;
         let t = x ^ (x << 11);
         self.x = self.y;
diff --git a/src/libstd/rt/io/comm_adapters.rs b/src/libstd/rt/io/comm_adapters.rs
index 6a3e44b2a4d..06424fee8bc 100644
--- a/src/libstd/rt/io/comm_adapters.rs
+++ b/src/libstd/rt/io/comm_adapters.rs
@@ -31,9 +31,9 @@ impl<C: GenericChan<~[u8]>> ChanWriter<C> {
 }
 
 impl<C: GenericChan<~[u8]>> Writer for ChanWriter<C> {
-    pub fn write(&mut self, _buf: &[u8]) { fail!() }
+    fn write(&mut self, _buf: &[u8]) { fail!() }
 
-    pub fn flush(&mut self) { fail!() }
+    fn flush(&mut self) { fail!() }
 }
 
 struct ReaderPort<R>;
diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs
index ae5e7dd27b5..6c5a28b31b1 100644
--- a/src/libstd/rt/uv/mod.rs
+++ b/src/libstd/rt/uv/mod.rs
@@ -90,8 +90,8 @@ pub trait Request { }
 
 /// A type that wraps a native handle
 pub trait NativeHandle<T> {
-    pub fn from_native_handle(T) -> Self;
-    pub fn native_handle(&self) -> T;
+    fn from_native_handle(T) -> Self;
+    fn native_handle(&self) -> T;
 }
 
 impl Loop {
@@ -155,7 +155,7 @@ pub trait WatcherInterop {
 
 impl<H, W: Watcher + NativeHandle<*H>> WatcherInterop for W {
     /// Get the uv event loop from a Watcher
-    pub fn event_loop(&self) -> Loop {
+    fn event_loop(&self) -> Loop {
         unsafe {
             let handle = self.native_handle();
             let loop_ = uvll::get_loop_for_uv_handle(handle);
@@ -163,7 +163,7 @@ impl<H, W: Watcher + NativeHandle<*H>> WatcherInterop for W {
         }
     }
 
-    pub fn install_watcher_data(&mut self) {
+    fn install_watcher_data(&mut self) {
         unsafe {
             let data = ~WatcherData {
                 read_cb: None,
@@ -182,7 +182,7 @@ impl<H, W: Watcher + NativeHandle<*H>> WatcherInterop for W {
         }
     }
 
-    pub fn get_watcher_data<'r>(&'r mut self) -> &'r mut WatcherData {
+    fn get_watcher_data<'r>(&'r mut self) -> &'r mut WatcherData {
         unsafe {
             let data = uvll::get_data_for_uv_handle(self.native_handle());
             let data = transmute::<&*c_void, &mut ~WatcherData>(&data);
@@ -190,7 +190,7 @@ impl<H, W: Watcher + NativeHandle<*H>> WatcherInterop for W {
         }
     }
 
-    pub fn drop_watcher_data(&mut self) {
+    fn drop_watcher_data(&mut self) {
         unsafe {
             let data = uvll::get_data_for_uv_handle(self.native_handle());
             let _data = transmute::<*c_void, ~WatcherData>(data);
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 9e5f2db4092..886e4d86ab6 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -142,13 +142,13 @@ pub fn push_str(lhs: &mut ~str, rhs: &str) {
 
 #[allow(missing_doc)]
 pub trait StrVector {
-    pub fn concat(&self) -> ~str;
-    pub fn connect(&self, sep: &str) -> ~str;
+    fn concat(&self) -> ~str;
+    fn connect(&self, sep: &str) -> ~str;
 }
 
 impl<'self, S: Str> StrVector for &'self [S] {
     /// Concatenate a vector of strings.
-    pub fn concat(&self) -> ~str {
+    fn concat(&self) -> ~str {
         if self.is_empty() { return ~""; }
 
         let len = self.iter().map(|s| s.as_slice().len()).sum();
@@ -171,7 +171,7 @@ impl<'self, S: Str> StrVector for &'self [S] {
     }
 
     /// Concatenate a vector of strings, placing a given separator between each.
-    pub fn connect(&self, sep: &str) -> ~str {
+    fn connect(&self, sep: &str) -> ~str {
         if self.is_empty() { return ~""; }
 
         // concat is faster
@@ -1554,7 +1554,7 @@ impl<'self> StrSlice<'self> for &'self str {
     /// # Return value
     ///
     /// The original string with all occurances of `from` replaced with `to`
-    pub fn replace(&self, from: &str, to: &str) -> ~str {
+    fn replace(&self, from: &str, to: &str) -> ~str {
         let mut result = ~"";
         let mut last_end = 0;
         for (start, end) in self.matches_index_iter(from) {
@@ -2081,7 +2081,7 @@ impl OwnedStr for ~str {
     /// * s - A string
     /// * n - The number of bytes to reserve space for
     #[inline]
-    pub fn reserve(&mut self, n: uint) {
+    fn reserve(&mut self, n: uint) {
         unsafe {
             let v: &mut ~[u8] = cast::transmute(self);
             (*v).reserve(n);
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs
index 2228922d9e4..27e09d85479 100644
--- a/src/libstd/vec.rs
+++ b/src/libstd/vec.rs
@@ -313,18 +313,18 @@ pub fn connect_slices<T:Clone>(v: &[&[T]], sep: &T) -> ~[T] { v.connect_vec(sep)
 pub trait VectorVector<T> {
     // FIXME #5898: calling these .concat and .connect conflicts with
     // StrVector::con{cat,nect}, since they have generic contents.
-    pub fn concat_vec(&self) -> ~[T];
-    pub fn connect_vec(&self, sep: &T) -> ~[T];
+    fn concat_vec(&self) -> ~[T];
+    fn connect_vec(&self, sep: &T) -> ~[T];
 }
 
 impl<'self, T:Clone> VectorVector<T> for &'self [~[T]] {
     /// Flattens a vector of slices of T into a single vector of T.
-    pub fn concat_vec(&self) -> ~[T] {
+    fn concat_vec(&self) -> ~[T] {
         self.flat_map(|inner| (*inner).clone())
     }
 
     /// Concatenate a vector of vectors, placing a given separator between each.
-    pub fn connect_vec(&self, sep: &T) -> ~[T] {
+    fn connect_vec(&self, sep: &T) -> ~[T] {
         let mut r = ~[];
         let mut first = true;
         for inner in self.iter() {
@@ -337,12 +337,12 @@ impl<'self, T:Clone> VectorVector<T> for &'self [~[T]] {
 
 impl<'self,T:Clone> VectorVector<T> for &'self [&'self [T]] {
     /// Flattens a vector of slices of T into a single vector of T.
-    pub fn concat_vec(&self) -> ~[T] {
+    fn concat_vec(&self) -> ~[T] {
         self.flat_map(|&inner| inner.to_owned())
     }
 
     /// Concatenate a vector of slices, placing a given separator between each.
-    pub fn connect_vec(&self, sep: &T) -> ~[T] {
+    fn connect_vec(&self, sep: &T) -> ~[T] {
         let mut r = ~[];
         let mut first = true;
         for &inner in self.iter() {
@@ -1649,7 +1649,7 @@ impl<T:Eq> OwnedEqVector<T> for ~[T] {
     * Remove consecutive repeated elements from a vector; if the vector is
     * sorted, this removes all duplicates.
     */
-    pub fn dedup(&mut self) {
+    fn dedup(&mut self) {
         unsafe {
             // Although we have a mutable reference to `self`, we cannot make
             // *arbitrary* changes. There exists the possibility that this
@@ -2079,7 +2079,7 @@ pub mod bytes {
     /// A trait for operations on mutable operations on `[u8]`
     pub trait MutableByteVector {
         /// Sets all bytes of the receiver to the given value.
-        pub fn set_memory(self, value: u8);
+        fn set_memory(self, value: u8);
     }
 
     impl<'self> MutableByteVector for &'self mut [u8] {