From 930885d5e5f817e3d7609f93d5ba89b1abebfaf4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 9 Aug 2013 01:25:24 -0700 Subject: Forbid pub/priv where it has no effect Closes #5495 --- src/libstd/vec.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libstd/vec.rs') 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(v: &[&[T]], sep: &T) -> ~[T] { v.connect_vec(sep) pub trait VectorVector { // 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 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 for &'self [~[T]] { impl<'self,T:Clone> VectorVector 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 OwnedEqVector 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] { -- cgit 1.4.1-3-g733a5