Rename CopyableVector to CloneableVector
This commit is contained in:
parent
c6bd05303c
commit
8a71b53e6c
@ -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
|
||||
|
@ -72,7 +72,7 @@
|
||||
use ptr;
|
||||
use str::StrSlice;
|
||||
use str;
|
||||
use vec::{CopyableVector, ImmutableVector, MutableVector};
|
||||
use vec::{CloneableVector, ImmutableVector, MutableVector};
|
||||
use vec;
|
||||
use unstable::intrinsics;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
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.
|
||||
///
|
||||
|
@ -18,7 +18,7 @@
|
||||
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};
|
||||
|
@ -73,7 +73,7 @@
|
||||
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.
|
||||
|
@ -21,7 +21,7 @@
|
||||
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};
|
||||
|
||||
@ -332,7 +332,7 @@ pub fn new_opt<T: BytesContainer>(path: T) -> Option<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;
|
||||
|
@ -78,7 +78,7 @@
|
||||
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};
|
||||
|
@ -798,8 +798,8 @@ fn len(&self) -> uint {
|
||||
}
|
||||
}
|
||||
|
||||
/// 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];
|
||||
|
||||
@ -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] {
|
||||
@ -824,7 +824,7 @@ fn into_owned(self) -> ~[T] { self.to_owned() }
|
||||
}
|
||||
|
||||
/// 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() }
|
||||
|
||||
@ -833,7 +833,7 @@ fn into_owned(self) -> ~[T] { self }
|
||||
}
|
||||
|
||||
/// 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() }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user