1
Fork 0

core: Rename container mod to collections. Closes #12543

Also renames the `Container` trait to `Collection`.

[breaking-change]
This commit is contained in:
Brian Anderson 2014-05-19 11:32:09 -07:00 committed by Alex Crichton
parent 443a1cdf94
commit 50942c7695
46 changed files with 64 additions and 65 deletions

View file

@ -857,7 +857,7 @@ impl<S: hash::Writer> hash::Hash<S> for BitvSet {
} }
} }
impl Container for BitvSet { impl Collection for BitvSet {
#[inline] #[inline]
fn len(&self) -> uint { self.size } fn len(&self) -> uint { self.size }
} }

View file

@ -125,7 +125,7 @@ fn link_with_prev<T>(mut next: Box<Node<T>>, prev: Rawlink<Node<T>>)
Some(next) Some(next)
} }
impl<T> Container for DList<T> { impl<T> Collection for DList<T> {
/// O(1) /// O(1)
#[inline] #[inline]
fn is_empty(&self) -> bool { fn is_empty(&self) -> bool {

View file

@ -26,7 +26,7 @@ pub struct PriorityQueue<T> {
data: Vec<T>, data: Vec<T>,
} }
impl<T: Ord> Container for PriorityQueue<T> { impl<T: Ord> Collection for PriorityQueue<T> {
/// Returns the length of the queue /// Returns the length of the queue
fn len(&self) -> uint { self.data.len() } fn len(&self) -> uint { self.data.len() }
} }

View file

@ -33,7 +33,7 @@ pub struct RingBuf<T> {
elts: Vec<Option<T>> elts: Vec<Option<T>>
} }
impl<T> Container for RingBuf<T> { impl<T> Collection for RingBuf<T> {
/// Return the number of elements in the RingBuf /// Return the number of elements in the RingBuf
fn len(&self) -> uint { self.nelts } fn len(&self) -> uint { self.nelts }
} }

View file

@ -29,7 +29,7 @@ pub struct SmallIntMap<T> {
v: Vec<Option<T>>, v: Vec<Option<T>>,
} }
impl<V> Container for SmallIntMap<V> { impl<V> Collection for SmallIntMap<V> {
/// Return the number of elements in the map /// Return the number of elements in the map
fn len(&self) -> uint { fn len(&self) -> uint {
self.v.iter().filter(|elt| elt.is_some()).count() self.v.iter().filter(|elt| elt.is_some()).count()

View file

@ -610,7 +610,7 @@ impl<'a> StrAllocating for MaybeOwned<'a> {
} }
} }
impl<'a> Container for MaybeOwned<'a> { impl<'a> Collection for MaybeOwned<'a> {
#[inline] #[inline]
fn len(&self) -> uint { self.as_slice().len() } fn len(&self) -> uint { self.as_slice().len() }
} }
@ -2036,7 +2036,7 @@ mod tests {
#[test] #[test]
fn test_str_container() { fn test_str_container() {
fn sum_len<S: Container>(v: &[S]) -> uint { fn sum_len<S: Collection>(v: &[S]) -> uint {
v.iter().map(|x| x.len()).sum() v.iter().map(|x| x.len()).sum()
} }

View file

@ -279,7 +279,7 @@ impl String {
} }
} }
impl Container for String { impl Collection for String {
#[inline] #[inline]
fn len(&self) -> uint { fn len(&self) -> uint {
self.vec.len() self.vec.len()

View file

@ -86,7 +86,7 @@ impl<K: Ord + Show, V: Show> Show for TreeMap<K, V> {
} }
} }
impl<K: Ord, V> Container for TreeMap<K, V> { impl<K: Ord, V> Collection for TreeMap<K, V> {
fn len(&self) -> uint { self.length } fn len(&self) -> uint { self.length }
} }
@ -579,7 +579,7 @@ impl<T: Ord + Show> Show for TreeSet<T> {
} }
} }
impl<T: Ord> Container for TreeSet<T> { impl<T: Ord> Collection for TreeSet<T> {
#[inline] #[inline]
fn len(&self) -> uint { self.map.len() } fn len(&self) -> uint { self.map.len() }
} }

View file

@ -38,7 +38,7 @@ pub struct TrieMap<T> {
length: uint length: uint
} }
impl<T> Container for TrieMap<T> { impl<T> Collection for TrieMap<T> {
/// Return the number of elements in the map /// Return the number of elements in the map
#[inline] #[inline]
fn len(&self) -> uint { self.length } fn len(&self) -> uint { self.length }
@ -285,7 +285,7 @@ pub struct TrieSet {
map: TrieMap<()> map: TrieMap<()>
} }
impl Container for TrieSet { impl Collection for TrieSet {
/// Return the number of elements in the set /// Return the number of elements in the set
#[inline] #[inline]
fn len(&self) -> uint { self.map.len() } fn len(&self) -> uint { self.map.len() }

View file

@ -393,7 +393,7 @@ impl<T: Ord> Ord for Vec<T> {
} }
} }
impl<T> Container for Vec<T> { impl<T> Collection for Vec<T> {
#[inline] #[inline]
fn len(&self) -> uint { fn len(&self) -> uint {
self.len self.len

View file

@ -8,13 +8,13 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
//! Traits for generic containers (including `Map` and `Set`) //! Traits for generic collections (including `Map` and `Set`)
use option::Option; use option::Option;
/// A trait to represent the abstract idea of a container. The only concrete /// A trait to represent the abstract idea of a container. The only concrete
/// knowledge known is the number of elements contained within. /// knowledge known is the number of elements contained within.
pub trait Container { pub trait Collection {
/// Return the number of elements in the container /// Return the number of elements in the container
fn len(&self) -> uint; fn len(&self) -> uint;
@ -26,14 +26,14 @@ pub trait Container {
} }
/// A trait to represent mutable containers /// A trait to represent mutable containers
pub trait Mutable: Container { pub trait Mutable: Collection {
/// Clear the container, removing all values. /// Clear the container, removing all values.
fn clear(&mut self); fn clear(&mut self);
} }
/// A map is a key-value store where values may be looked up by their keys. This /// A map is a key-value store where values may be looked up by their keys. This
/// trait provides basic operations to operate on these stores. /// trait provides basic operations to operate on these stores.
pub trait Map<K, V>: Container { pub trait Map<K, V>: Collection {
/// Return a reference to the value corresponding to the key /// Return a reference to the value corresponding to the key
fn find<'a>(&'a self, key: &K) -> Option<&'a V>; fn find<'a>(&'a self, key: &K) -> Option<&'a V>;
@ -76,7 +76,7 @@ pub trait MutableMap<K, V>: Map<K, V> + Mutable {
/// A set is a group of objects which are each distinct from one another. This /// A set is a group of objects which are each distinct from one another. This
/// trait represents actions which can be performed on sets to iterate over /// trait represents actions which can be performed on sets to iterate over
/// them. /// them.
pub trait Set<T>: Container { pub trait Set<T>: Collection {
/// Return true if the set contains a value /// Return true if the set contains a value
fn contains(&self, value: &T) -> bool; fn contains(&self, value: &T) -> bool;

View file

@ -11,7 +11,7 @@
#![allow(missing_doc)] #![allow(missing_doc)]
use char; use char;
use container::Container; use collections::Collection;
use fmt; use fmt;
use iter::{Iterator, range, DoubleEndedIterator}; use iter::{Iterator, range, DoubleEndedIterator};
use num::{Float, FPNaN, FPInfinite, ToPrimitive, Primitive}; use num::{Float, FPNaN, FPInfinite, ToPrimitive, Primitive};

View file

@ -15,7 +15,7 @@
use any; use any;
use cell::Cell; use cell::Cell;
use char::Char; use char::Char;
use container::Container; use collections::Collection;
use iter::{Iterator, range}; use iter::{Iterator, range};
use kinds::Copy; use kinds::Copy;
use mem; use mem;

View file

@ -14,7 +14,7 @@
#![allow(unsigned_negate)] #![allow(unsigned_negate)]
use container::Container; use collections::Collection;
use fmt; use fmt;
use iter::{Iterator, DoubleEndedIterator}; use iter::{Iterator, DoubleEndedIterator};
use num::{Int, cast, zero}; use num::{Int, cast, zero};

View file

@ -108,7 +108,7 @@ pub mod ptr;
#[cfg(not(test))] pub mod cmp; #[cfg(not(test))] pub mod cmp;
pub mod clone; pub mod clone;
pub mod default; pub mod default;
pub mod container; pub mod collections;
/* Core types and methods on primitives */ /* Core types and methods on primitives */

View file

@ -47,7 +47,7 @@ pub use char::Char;
pub use clone::Clone; pub use clone::Clone;
pub use cmp::{PartialEq, PartialOrd, Eq, Ord}; pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
pub use cmp::{Ordering, Less, Equal, Greater, Equiv}; pub use cmp::{Ordering, Less, Equal, Greater, Equiv};
pub use container::{Container, Mutable, Map, MutableMap, Set, MutableSet}; pub use collections::Collection;
pub use iter::{FromIterator, Extendable}; pub use iter::{FromIterator, Extendable};
pub use iter::{Iterator, DoubleEndedIterator, RandomAccessIterator, CloneableIterator}; pub use iter::{Iterator, DoubleEndedIterator, RandomAccessIterator, CloneableIterator};
pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize}; pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize};

View file

@ -25,7 +25,7 @@
// Currently, no progress has been made on this list. // Currently, no progress has been made on this list.
use clone::Clone; use clone::Clone;
use container::Container; use collections::Collection;
use finally::try_finally; use finally::try_finally;
use intrinsics; use intrinsics;
use iter::{range, Iterator}; use iter::{range, Iterator};

View file

@ -16,7 +16,7 @@
use mem::transmute; use mem::transmute;
use clone::Clone; use clone::Clone;
use container::Container; use collections::Collection;
use cmp::{PartialEq, Ord, Ordering, Less, Equal, Greater}; use cmp::{PartialEq, Ord, Ordering, Less, Equal, Greater};
use cmp; use cmp;
use default::Default; use default::Default;
@ -253,7 +253,7 @@ pub mod traits {
use cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering, Equiv}; use cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering, Equiv};
use iter::order; use iter::order;
use container::Container; use collections::Collection;
impl<'a,T:PartialEq> PartialEq for &'a [T] { impl<'a,T:PartialEq> PartialEq for &'a [T] {
fn eq(&self, other: & &'a [T]) -> bool { fn eq(&self, other: & &'a [T]) -> bool {
@ -347,7 +347,7 @@ impl<T> Vector<T> for ~[T] {
fn as_slice<'a>(&'a self) -> &'a [T] { let v: &'a [T] = *self; v } fn as_slice<'a>(&'a self) -> &'a [T] { let v: &'a [T] = *self; v }
} }
impl<'a, T> Container for &'a [T] { impl<'a, T> Collection for &'a [T] {
/// Returns the length of a vector /// Returns the length of a vector
#[inline] #[inline]
fn len(&self) -> uint { fn len(&self) -> uint {
@ -355,7 +355,7 @@ impl<'a, T> Container for &'a [T] {
} }
} }
impl<T> Container for ~[T] { impl<T> Collection for ~[T] {
/// Returns the length of a vector /// Returns the length of a vector
#[inline] #[inline]
fn len(&self) -> uint { fn len(&self) -> uint {
@ -1205,7 +1205,7 @@ pub mod raw {
/// Operations on `[u8]`. /// Operations on `[u8]`.
pub mod bytes { pub mod bytes {
use container::Container; use collections::Collection;
use ptr; use ptr;
use slice::MutableVector; use slice::MutableVector;

View file

@ -19,7 +19,7 @@ use char;
use clone::Clone; use clone::Clone;
use cmp; use cmp;
use cmp::{PartialEq, Eq}; use cmp::{PartialEq, Eq};
use container::Container; use collections::Collection;
use default::Default; use default::Default;
use iter::{Filter, Map, Iterator}; use iter::{Filter, Map, Iterator};
use iter::{DoubleEndedIterator, ExactSize}; use iter::{DoubleEndedIterator, ExactSize};
@ -866,7 +866,7 @@ static TAG_CONT_U8: u8 = 128u8;
/// Unsafe operations /// Unsafe operations
pub mod raw { pub mod raw {
use mem; use mem;
use container::Container; use collections::Collection;
use ptr::RawPtr; use ptr::RawPtr;
use raw::Slice; use raw::Slice;
use slice::{ImmutableVector}; use slice::{ImmutableVector};
@ -930,8 +930,8 @@ Section: Trait implementations
#[cfg(not(test))] #[cfg(not(test))]
#[allow(missing_doc)] #[allow(missing_doc)]
pub mod traits { pub mod traits {
use container::Container;
use cmp::{Ord, Ordering, Less, Equal, Greater, PartialEq, PartialOrd, Equiv, Eq}; use cmp::{Ord, Ordering, Less, Equal, Greater, PartialEq, PartialOrd, Equiv, Eq};
use collections::Collection;
use iter::Iterator; use iter::Iterator;
use option::{Some, None}; use option::{Some, None};
use str::{Str, StrSlice, eq_slice}; use str::{Str, StrSlice, eq_slice};
@ -987,7 +987,7 @@ impl<'a> Str for &'a str {
fn as_slice<'a>(&'a self) -> &'a str { *self } fn as_slice<'a>(&'a self) -> &'a str { *self }
} }
impl<'a> Container for &'a str { impl<'a> Collection for &'a str {
#[inline] #[inline]
fn len(&self) -> uint { fn len(&self) -> uint {
self.repr().len self.repr().len

View file

@ -775,7 +775,7 @@ impl<'t> Captures<'t> {
} }
} }
impl<'t> Container for Captures<'t> { impl<'t> Collection for Captures<'t> {
/// Returns the number of captured groups. /// Returns the number of captured groups.
#[inline] #[inline]
fn len(&self) -> uint { fn len(&self) -> uint {

View file

@ -45,7 +45,6 @@
#![allow(unsigned_negate)] #![allow(unsigned_negate)]
use std::container::Map;
use libc::c_ulonglong; use libc::c_ulonglong;
use std::num::{Bitwise}; use std::num::{Bitwise};
use std::rc::Rc; use std::rc::Rc;

View file

@ -229,7 +229,7 @@ impl Drop for CString {
} }
} }
impl Container for CString { impl Collection for CString {
/// Return the number of bytes in the CString (not including the NUL terminator). /// Return the number of bytes in the CString (not including the NUL terminator).
/// ///
/// # Failure /// # Failure

View file

@ -10,7 +10,7 @@
//! Operations on ASCII strings and characters //! Operations on ASCII strings and characters
use container::Container; use collections::Collection;
use fmt; use fmt;
use iter::Iterator; use iter::Iterator;
use mem; use mem;

View file

@ -33,7 +33,7 @@
//! handled correctly, i.e. that allocated memory is eventually freed //! handled correctly, i.e. that allocated memory is eventually freed
//! if necessary. //! if necessary.
use container::Container; use collections::Collection;
use kinds::Send; use kinds::Send;
use mem; use mem;
use ops::Drop; use ops::Drop;
@ -149,7 +149,7 @@ impl<T> CVec<T> {
} }
} }
impl<T> Container for CVec<T> { impl<T> Collection for CVec<T> {
fn len(&self) -> uint { self.len } fn len(&self) -> uint { self.len }
} }

View file

@ -1504,7 +1504,7 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> PartialEq for HashSet<T, H> {
impl<T: Eq + Hash<S>, S, H: Hasher<S>> Eq for HashSet<T, H> {} impl<T: Eq + Hash<S>, S, H: Hasher<S>> Eq for HashSet<T, H> {}
impl<T: Eq + Hash<S>, S, H: Hasher<S>> Container for HashSet<T, H> { impl<T: Eq + Hash<S>, S, H: Hasher<S>> Collection for HashSet<T, H> {
fn len(&self) -> uint { self.map.len() } fn len(&self) -> uint { self.map.len() }
} }
@ -2159,8 +2159,8 @@ mod test_set {
use prelude::*; use prelude::*;
use super::HashSet; use super::HashSet;
use container::Container;
use slice::ImmutableEqVector; use slice::ImmutableEqVector;
use std::collections::Collection;
#[test] #[test]
fn test_disjoint() { fn test_disjoint() {

View file

@ -227,7 +227,7 @@ impl<A: fmt::Show + Hash + Eq, B: fmt::Show> fmt::Show for LruCache<A, B> {
} }
} }
impl<K: Hash + Eq, V> Container for LruCache<K, V> { impl<K: Hash + Eq, V> Collection for LruCache<K, V> {
/// Return the number of key-value pairs in the cache. /// Return the number of key-value pairs in the cache.
fn len(&self) -> uint { fn len(&self) -> uint {
self.map.len() self.map.len()

View file

@ -33,7 +33,7 @@
/// of a synchronous channel. There are a few branches for the unbuffered case, /// of a synchronous channel. There are a few branches for the unbuffered case,
/// but they're mostly just relevant to blocking senders. /// but they're mostly just relevant to blocking senders.
use container::Container; use collections::Collection;
use iter::Iterator; use iter::Iterator;
use kinds::Send; use kinds::Send;
use mem; use mem;

View file

@ -11,7 +11,7 @@
//! Buffering wrappers for I/O traits //! Buffering wrappers for I/O traits
use cmp; use cmp;
use container::Container; use collections::Collection;
use io::{Reader, Writer, Stream, Buffer, DEFAULT_BUF_SIZE, IoResult}; use io::{Reader, Writer, Stream, Buffer, DEFAULT_BUF_SIZE, IoResult};
use iter::ExactSize; use iter::ExactSize;
use ops::Drop; use ops::Drop;

View file

@ -10,7 +10,7 @@
use clone::Clone; use clone::Clone;
use cmp; use cmp;
use container::Container; use collections::Collection;
use comm::{Sender, Receiver}; use comm::{Sender, Receiver};
use io; use io;
use option::{None, Option, Some}; use option::{None, Option, Some};

View file

@ -15,7 +15,7 @@
// FIXME: Not sure how this should be structured // FIXME: Not sure how this should be structured
// FIXME: Iteration should probably be considered separately // FIXME: Iteration should probably be considered separately
use container::Container; use collections::Collection;
use iter::Iterator; use iter::Iterator;
use option::{Option, Some, None}; use option::{Option, Some, None};
use result::{Ok, Err}; use result::{Ok, Err};
@ -504,7 +504,7 @@ mod test {
mod bench { mod bench {
extern crate test; extern crate test;
use container::Container; use collections::Collection;
use prelude::*; use prelude::*;
use self::test::Bencher; use self::test::Bencher;

View file

@ -51,7 +51,7 @@ fs::unlink(&path);
use c_str::ToCStr; use c_str::ToCStr;
use clone::Clone; use clone::Clone;
use container::Container; use collections::Collection;
use io; use io;
use iter::Iterator; use iter::Iterator;
use kinds::Send; use kinds::Send;

View file

@ -11,7 +11,7 @@
//! Readers and Writers for in-memory buffers //! Readers and Writers for in-memory buffers
use cmp::min; use cmp::min;
use container::Container; use collections::Collection;
use option::None; use option::None;
use result::{Err, Ok}; use result::{Err, Ok};
use io; use io;

View file

@ -214,7 +214,7 @@ responding to errors that may occur while attempting to read the numbers.
#![deny(unused_must_use)] #![deny(unused_must_use)]
use char::Char; use char::Char;
use container::Container; use collections::Collection;
use fmt; use fmt;
use int; use int;
use iter::Iterator; use iter::Iterator;

View file

@ -15,7 +15,7 @@
#![allow(missing_doc)] #![allow(missing_doc)]
use container::Container; use collections::Collection;
use fmt; use fmt;
use from_str::FromStr; use from_str::FromStr;
use iter::Iterator; use iter::Iterator;

View file

@ -144,7 +144,7 @@ pub use core::cell;
pub use core::char; pub use core::char;
pub use core::clone; pub use core::clone;
#[cfg(not(test))] pub use core::cmp; #[cfg(not(test))] pub use core::cmp;
pub use core::container; pub use core::collections;
pub use core::default; pub use core::default;
pub use core::finally; pub use core::finally;
pub use core::intrinsics; pub use core::intrinsics;

View file

@ -12,7 +12,7 @@
use char; use char;
use clone::Clone; use clone::Clone;
use container::Container; use collections::Collection;
use num::{NumCast, Zero, One, cast, Int}; use num::{NumCast, Zero, One, cast, Int};
use num::{Float, FPNaN, FPInfinite, ToPrimitive}; use num::{Float, FPNaN, FPInfinite, ToPrimitive};
use num; use num;

View file

@ -30,7 +30,7 @@
#![allow(non_snake_case_functions)] #![allow(non_snake_case_functions)]
use clone::Clone; use clone::Clone;
use container::Container; use collections::Collection;
use fmt; use fmt;
use iter::Iterator; use iter::Iterator;
use libc::{c_void, c_int}; use libc::{c_void, c_int};

View file

@ -65,7 +65,7 @@ println!("path exists: {}", path.exists());
#![deny(deprecated_owned_vector)] #![deny(deprecated_owned_vector)]
use container::Container; use collections::Collection;
use c_str::CString; use c_str::CString;
use clone::Clone; use clone::Clone;
use fmt; use fmt;

View file

@ -14,7 +14,7 @@ use ascii::AsciiCast;
use c_str::{CString, ToCStr}; use c_str::{CString, ToCStr};
use clone::Clone; use clone::Clone;
use cmp::{PartialEq, Eq}; use cmp::{PartialEq, Eq};
use container::Container; use collections::Collection;
use from_str::FromStr; use from_str::FromStr;
use hash; use hash;
use io::Writer; use io::Writer;

View file

@ -13,7 +13,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
use char::Char; use char::Char;
use container::Container; use collections::Collection;
use from_str::from_str; use from_str::from_str;
use io::{IoResult, Writer}; use io::{IoResult, Writer};
use iter::Iterator; use iter::Iterator;
@ -348,7 +348,7 @@ mod imp {
#[cfg(not(target_os = "macos"))] #[cfg(not(target_os = "macos"))]
fn print(w: &mut Writer, idx: int, addr: *libc::c_void) -> IoResult<()> { fn print(w: &mut Writer, idx: int, addr: *libc::c_void) -> IoResult<()> {
use container::Container; use collections::Collection;
use iter::Iterator; use iter::Iterator;
use os; use os;
use path::GenericPath; use path::GenericPath;

View file

@ -121,7 +121,7 @@ impl<T: PartialEq> PartialEq for OwnedSlice<T> {
impl<T: Eq> Eq for OwnedSlice<T> {} impl<T: Eq> Eq for OwnedSlice<T> {}
impl<T> Container for OwnedSlice<T> { impl<T> Collection for OwnedSlice<T> {
fn len(&self) -> uint { self.len } fn len(&self) -> uint { self.len }
} }

View file

@ -23,7 +23,7 @@ enum SmallVectorRepr<T> {
Many(Vec<T> ), Many(Vec<T> ),
} }
impl<T> Container for SmallVector<T> { impl<T> Collection for SmallVector<T> {
fn len(&self) -> uint { fn len(&self) -> uint {
match self.repr { match self.repr {
Zero => 0, Zero => 0,

View file

@ -18,6 +18,6 @@ fn main() {
let x: Box<HashMap<int, int>> = box HashMap::new(); let x: Box<HashMap<int, int>> = box HashMap::new();
let x: Box<Map<int, int>> = x; let x: Box<Map<int, int>> = x;
let y: Box<Map<uint, int>> = box x; let y: Box<Map<uint, int>> = box x;
//~^ ERROR failed to find an implementation of trait core::container::Map<uint,int> //~^ ERROR failed to find an implementation of trait core::collections::Map<uint,int>
// for ~core::container::Map<int,int>:Send // for ~core::collections::Map<int,int>:Send
} }

View file

@ -48,7 +48,7 @@ impl<T> cat<T> {
} }
} }
impl<T> Container for cat<T> { impl<T> Collection for cat<T> {
fn len(&self) -> uint { self.meows as uint } fn len(&self) -> uint { self.meows as uint }
fn is_empty(&self) -> bool { self.meows == 0 } fn is_empty(&self) -> bool { self.meows == 0 }
} }

View file

@ -10,7 +10,7 @@
extern crate collections; extern crate collections;
use std::container::{Map, MutableMap}; use std::collections::{Map, MutableMap};
use std::str::{SendStr, Owned, Slice}; use std::str::{SendStr, Owned, Slice};
use std::collections::HashMap; use std::collections::HashMap;
use std::option::Some; use std::option::Some;

View file

@ -10,7 +10,7 @@
extern crate collections; extern crate collections;
use std::container::{ Map, MutableMap}; use std::collections::{ Map, MutableMap};
use std::str::{SendStr, Owned, Slice}; use std::str::{SendStr, Owned, Slice};
use std::to_str::ToStr; use std::to_str::ToStr;
use self::collections::TreeMap; use self::collections::TreeMap;