1
Fork 0

Rename CopyableVector to CloneableVector

This commit is contained in:
Virgile Andreani 2014-01-28 19:40:38 +01:00
parent c6bd05303c
commit 8a71b53e6c
8 changed files with 13 additions and 13 deletions

View file

@ -101,7 +101,7 @@ syn keyword rustTrait ImmutableTuple5 ImmutableTuple6 ImmutableTuple7 ImmutableT
syn keyword rustTrait ImmutableTuple9 ImmutableTuple10 ImmutableTuple11 ImmutableTuple12 syn keyword rustTrait ImmutableTuple9 ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCopyableVector syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCopyableVector
syn keyword rustTrait OwnedVector OwnedCopyableVector OwnedEqVector MutableVector 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 rustFunction stream
syn keyword rustTrait Port Chan GenericChan GenericSmartChan GenericPort Peekable syn keyword rustTrait Port Chan GenericChan GenericSmartChan GenericPort Peekable

View file

@ -72,7 +72,7 @@ use ptr::RawPtr;
use ptr; use ptr;
use str::StrSlice; use str::StrSlice;
use str; use str;
use vec::{CopyableVector, ImmutableVector, MutableVector}; use vec::{CloneableVector, ImmutableVector, MutableVector};
use vec; use vec;
use unstable::intrinsics; use unstable::intrinsics;

View file

@ -15,7 +15,7 @@ use cmp;
use io; use io;
use option::{None, Option, Some}; use option::{None, Option, Some};
use super::{Reader, Writer}; use super::{Reader, Writer};
use vec::{bytes, CopyableVector, MutableVector, ImmutableVector}; use vec::{bytes, CloneableVector, MutableVector, ImmutableVector};
/// Allows reading from a port. /// Allows reading from a port.
/// ///

View file

@ -18,7 +18,7 @@ use option::{None, Option, Some};
use char; use char;
use str::{StrSlice}; use str::{StrSlice};
use str; use str;
use vec::{CopyableVector, ImmutableVector, MutableVector}; use vec::{CloneableVector, ImmutableVector, MutableVector};
use vec::OwnedVector; use vec::OwnedVector;
use num; use num;
use num::{NumCast, Zero, One, cast, Integer}; use num::{NumCast, Zero, One, cast, Integer};

View file

@ -73,7 +73,7 @@ use str;
use str::{OwnedStr, Str, StrSlice}; use str::{OwnedStr, Str, StrSlice};
use to_str::ToStr; use to_str::ToStr;
use vec; use vec;
use vec::{CopyableVector, OwnedCopyableVector, OwnedVector, Vector}; use vec::{CloneableVector, OwnedCopyableVector, OwnedVector, Vector};
use vec::{ImmutableEqVector, ImmutableVector}; use vec::{ImmutableEqVector, ImmutableVector};
/// Typedef for POSIX file paths. /// Typedef for POSIX file paths.

View file

@ -21,7 +21,7 @@ use str;
use str::Str; use str::Str;
use to_bytes::IterBytes; use to_bytes::IterBytes;
use vec; use vec;
use vec::{CopyableVector, RevSplits, Splits, Vector, VectorVector, use vec::{CloneableVector, RevSplits, Splits, Vector, VectorVector,
ImmutableEqVector, OwnedVector, ImmutableVector, OwnedCopyableVector}; ImmutableEqVector, OwnedVector, ImmutableVector, OwnedCopyableVector};
use super::{BytesContainer, GenericPath, GenericPathUnsafe}; use super::{BytesContainer, GenericPath, GenericPathUnsafe};
@ -332,7 +332,7 @@ impl Path {
/// Returns a normalized byte vector representation of a path, by removing all empty /// Returns a normalized byte vector representation of a path, by removing all empty
/// components, and unnecessary . and .. components. /// 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 // borrowck is being very picky
let val = { let val = {
let is_abs = !v.as_slice().is_empty() && v.as_slice()[0] == SEP_BYTE; let is_abs = !v.as_slice().is_empty() && v.as_slice()[0] == SEP_BYTE;

View file

@ -78,7 +78,7 @@ pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12};
pub use vec::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCopyableVector}; pub use vec::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCopyableVector};
pub use vec::{OwnedVector, OwnedCopyableVector,OwnedEqVector}; pub use vec::{OwnedVector, OwnedCopyableVector,OwnedEqVector};
pub use vec::{MutableVector, MutableTotalOrdVector}; pub use vec::{MutableVector, MutableTotalOrdVector};
pub use vec::{Vector, VectorVector, CopyableVector, ImmutableVector}; pub use vec::{Vector, VectorVector, CloneableVector, ImmutableVector};
// Reexported runtime types // Reexported runtime types
pub use comm::{Port, Chan, SharedChan}; pub use comm::{Port, Chan, SharedChan};

View file

@ -798,8 +798,8 @@ impl<T> Container for ~[T] {
} }
} }
/// Extension methods for vector slices with copyable elements /// Extension methods for vector slices with cloneable elements
pub trait CopyableVector<T> { pub trait CloneableVector<T> {
/// Copy `self` into a new owned vector /// Copy `self` into a new owned vector
fn to_owned(&self) -> ~[T]; fn to_owned(&self) -> ~[T];
@ -808,7 +808,7 @@ pub trait CopyableVector<T> {
} }
/// Extension methods for vector slices /// 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`. /// Returns a copy of `v`.
#[inline] #[inline]
fn to_owned(&self) -> ~[T] { fn to_owned(&self) -> ~[T] {
@ -824,7 +824,7 @@ impl<'a, T: Clone> CopyableVector<T> for &'a [T] {
} }
/// Extension methods for owned vectors /// Extension methods for owned vectors
impl<T: Clone> CopyableVector<T> for ~[T] { impl<T: Clone> CloneableVector<T> for ~[T] {
#[inline] #[inline]
fn to_owned(&self) -> ~[T] { self.clone() } fn to_owned(&self) -> ~[T] { self.clone() }
@ -833,7 +833,7 @@ impl<T: Clone> CopyableVector<T> for ~[T] {
} }
/// Extension methods for managed vectors /// Extension methods for managed vectors
impl<T: Clone> CopyableVector<T> for @[T] { impl<T: Clone> CloneableVector<T> for @[T] {
#[inline] #[inline]
fn to_owned(&self) -> ~[T] { self.as_slice().to_owned() } fn to_owned(&self) -> ~[T] { self.as_slice().to_owned() }