diff options
| author | bors <bors@rust-lang.org> | 2013-08-13 07:26:23 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-13 07:26:23 -0700 |
| commit | 0d817ee869387322dec4d3f7d407dcc9f91c2632 (patch) | |
| tree | 958140150cb50faae2b56a21bf4759261ec306d2 /src/libstd/vec.rs | |
| parent | f02cc6bf0a276115a31354b1c1530e6fe9eb4d58 (diff) | |
| parent | 930885d5e5f817e3d7609f93d5ba89b1abebfaf4 (diff) | |
auto merge of #8423 : alexcrichton/rust/less-priv-again, r=bstrie
Closes #5495
Diffstat (limited to 'src/libstd/vec.rs')
| -rw-r--r-- | src/libstd/vec.rs | 16 |
1 files changed, 8 insertions, 8 deletions
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] { |
