Skip to content

Commit 052f28a

Browse files
committed
minor vec cleanup
* hide the rustrt module in the docs * remove the useless `traits` module wrapping the `Add` impl
1 parent eee7acc commit 052f28a

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/libstd/vec.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use iter::FromIter;
2323
use kinds::Copy;
2424
use libc;
2525
use num::Zero;
26+
use ops::Add;
2627
use option::{None, Option, Some};
2728
use ptr::to_unsafe_ptr;
2829
use ptr;
@@ -40,6 +41,7 @@ use util;
4041

4142
#[cfg(not(test))] use cmp::Equiv;
4243

44+
#[doc(hidden)]
4345
pub mod rustrt {
4446
use libc;
4547
use vec::raw;
@@ -1180,16 +1182,10 @@ impl<T:Ord> Ord for @[T] {
11801182
}
11811183

11821184
#[cfg(not(test))]
1183-
pub mod traits {
1184-
use kinds::Copy;
1185-
use ops::Add;
1186-
use vec::append;
1187-
1188-
impl<'self,T:Copy> Add<&'self [T],~[T]> for ~[T] {
1189-
#[inline]
1190-
fn add(&self, rhs: & &'self [T]) -> ~[T] {
1191-
append(copy *self, (*rhs))
1192-
}
1185+
impl<'self,T:Copy> Add<&'self [T], ~[T]> for ~[T] {
1186+
#[inline]
1187+
fn add(&self, rhs: & &'self [T]) -> ~[T] {
1188+
append(copy *self, (*rhs))
11931189
}
11941190
}
11951191

0 commit comments

Comments
 (0)