]> git.lizzy.rs Git - rust.git/commitdiff
minor vec cleanup
authorDaniel Micay <danielmicay@gmail.com>
Sat, 29 Jun 2013 03:44:55 +0000 (23:44 -0400)
committerDaniel Micay <danielmicay@gmail.com>
Sat, 29 Jun 2013 21:37:03 +0000 (17:37 -0400)
* hide the rustrt module in the docs
* remove the useless `traits` module wrapping the `Add` impl

src/libstd/vec.rs

index 4196fbac0beb5a7bc391784364858dc75d09f54d..cff4ac10145c74b3db9ca0ab41803776a062cbc2 100644 (file)
@@ -23,6 +23,7 @@
 use kinds::Copy;
 use libc;
 use num::Zero;
+use ops::Add;
 use option::{None, Option, Some};
 use ptr::to_unsafe_ptr;
 use ptr;
@@ -40,6 +41,7 @@
 
 #[cfg(not(test))] use cmp::Equiv;
 
+#[doc(hidden)]
 pub mod rustrt {
     use libc;
     use vec::raw;
@@ -1180,16 +1182,10 @@ fn gt(&self, other: &@[T]) -> bool { gt((*self), (*other)) }
 }
 
 #[cfg(not(test))]
-pub mod traits {
-    use kinds::Copy;
-    use ops::Add;
-    use vec::append;
-
-    impl<'self,T:Copy> Add<&'self [T],~[T]> for ~[T] {
-        #[inline]
-        fn add(&self, rhs: & &'self [T]) -> ~[T] {
-            append(copy *self, (*rhs))
-        }
+impl<'self,T:Copy> Add<&'self [T], ~[T]> for ~[T] {
+    #[inline]
+    fn add(&self, rhs: & &'self [T]) -> ~[T] {
+        append(copy *self, (*rhs))
     }
 }