Skip to content

Commit

Permalink
Rename CopyableVector to CloneableVector
Browse files Browse the repository at this point in the history
  • Loading branch information
Armavica committed Jan 28, 2014
1 parent c6bd053 commit 8a71b53
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/etc/vim/syntax/rust.vim
Expand Up @@ -101,7 +101,7 @@ syn keyword rustTrait ImmutableTuple5 ImmutableTuple6 ImmutableTuple7 ImmutableT
syn keyword rustTrait ImmutableTuple9 ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCopyableVector
syn keyword rustTrait OwnedVector OwnedCopyableVector OwnedEqVector MutableVector
syn keyword rustTrait Vector VectorVector CopyableVector ImmutableVector
syn keyword rustTrait Vector VectorVector CloneableVector ImmutableVector

"syn keyword rustFunction stream
syn keyword rustTrait Port Chan GenericChan GenericSmartChan GenericPort Peekable
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/c_str.rs
Expand Up @@ -72,7 +72,7 @@ use ptr::RawPtr;
use ptr;
use str::StrSlice;
use str;
use vec::{CopyableVector, ImmutableVector, MutableVector};
use vec::{CloneableVector, ImmutableVector, MutableVector};
use vec;
use unstable::intrinsics;

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/comm_adapters.rs
Expand Up @@ -15,7 +15,7 @@ use cmp;
use io;
use option::{None, Option, Some};
use super::{Reader, Writer};
use vec::{bytes, CopyableVector, MutableVector, ImmutableVector};
use vec::{bytes, CloneableVector, MutableVector, ImmutableVector};

/// Allows reading from a port.
///
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/num/strconv.rs
Expand Up @@ -18,7 +18,7 @@ use option::{None, Option, Some};
use char;
use str::{StrSlice};
use str;
use vec::{CopyableVector, ImmutableVector, MutableVector};
use vec::{CloneableVector, ImmutableVector, MutableVector};
use vec::OwnedVector;
use num;
use num::{NumCast, Zero, One, cast, Integer};
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/path/mod.rs
Expand Up @@ -73,7 +73,7 @@ use str;
use str::{OwnedStr, Str, StrSlice};
use to_str::ToStr;
use vec;
use vec::{CopyableVector, OwnedCopyableVector, OwnedVector, Vector};
use vec::{CloneableVector, OwnedCopyableVector, OwnedVector, Vector};
use vec::{ImmutableEqVector, ImmutableVector};

/// Typedef for POSIX file paths.
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/path/posix.rs
Expand Up @@ -21,7 +21,7 @@ use str;
use str::Str;
use to_bytes::IterBytes;
use vec;
use vec::{CopyableVector, RevSplits, Splits, Vector, VectorVector,
use vec::{CloneableVector, RevSplits, Splits, Vector, VectorVector,
ImmutableEqVector, OwnedVector, ImmutableVector, OwnedCopyableVector};
use super::{BytesContainer, GenericPath, GenericPathUnsafe};

Expand Down Expand Up @@ -332,7 +332,7 @@ impl Path {

/// Returns a normalized byte vector representation of a path, by removing all empty
/// components, and unnecessary . and .. components.
fn normalize<V: Vector<u8>+CopyableVector<u8>>(v: V) -> ~[u8] {
fn normalize<V: Vector<u8>+CloneableVector<u8>>(v: V) -> ~[u8] {
// borrowck is being very picky
let val = {
let is_abs = !v.as_slice().is_empty() && v.as_slice()[0] == SEP_BYTE;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/prelude.rs
Expand Up @@ -78,7 +78,7 @@ pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12};
pub use vec::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCopyableVector};
pub use vec::{OwnedVector, OwnedCopyableVector,OwnedEqVector};
pub use vec::{MutableVector, MutableTotalOrdVector};
pub use vec::{Vector, VectorVector, CopyableVector, ImmutableVector};
pub use vec::{Vector, VectorVector, CloneableVector, ImmutableVector};

// Reexported runtime types
pub use comm::{Port, Chan, SharedChan};
Expand Down
10 changes: 5 additions & 5 deletions src/libstd/vec.rs
Expand Up @@ -798,8 +798,8 @@ impl<T> Container for ~[T] {
}
}

/// Extension methods for vector slices with copyable elements
pub trait CopyableVector<T> {
/// Extension methods for vector slices with cloneable elements
pub trait CloneableVector<T> {
/// Copy `self` into a new owned vector
fn to_owned(&self) -> ~[T];

Expand All @@ -808,7 +808,7 @@ pub trait CopyableVector<T> {
}

/// Extension methods for vector slices
impl<'a, T: Clone> CopyableVector<T> for &'a [T] {
impl<'a, T: Clone> CloneableVector<T> for &'a [T] {
/// Returns a copy of `v`.
#[inline]
fn to_owned(&self) -> ~[T] {
Expand All @@ -824,7 +824,7 @@ impl<'a, T: Clone> CopyableVector<T> for &'a [T] {
}

/// Extension methods for owned vectors
impl<T: Clone> CopyableVector<T> for ~[T] {
impl<T: Clone> CloneableVector<T> for ~[T] {
#[inline]
fn to_owned(&self) -> ~[T] { self.clone() }

Expand All @@ -833,7 +833,7 @@ impl<T: Clone> CopyableVector<T> for ~[T] {
}

/// Extension methods for managed vectors
impl<T: Clone> CopyableVector<T> for @[T] {
impl<T: Clone> CloneableVector<T> for @[T] {
#[inline]
fn to_owned(&self) -> ~[T] { self.as_slice().to_owned() }

Expand Down

0 comments on commit 8a71b53

Please sign in to comment.