diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-30 13:43:24 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-11-01 11:37:04 -0700 |
| commit | 21ac985af44f4e2470ef6f4c0eb4d72daf5a6497 (patch) | |
| tree | a120c184188926cd154b40f9da77ad8a6a455c1b /src/libstd/io | |
| parent | 1442235d3feab4c5ca3f55e2b3345583f640a17e (diff) | |
| download | rust-21ac985af44f4e2470ef6f4c0eb4d72daf5a6497.tar.gz rust-21ac985af44f4e2470ef6f4c0eb4d72daf5a6497.zip | |
collections: Remove all collections traits
As part of the collections reform RFC, this commit removes all collections traits in favor of inherent methods on collections themselves. All methods should continue to be available on all collections. This is a breaking change with all of the collections traits being removed and no longer being in the prelude. In order to update old code you should move the trait implementations to inherent implementations directly on the type itself. Note that some traits had default methods which will also need to be implemented to maintain backwards compatibility. [breaking-change] cc #18424
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/buffered.rs | 1 | ||||
| -rw-r--r-- | src/libstd/io/comm_adapters.rs | 1 | ||||
| -rw-r--r-- | src/libstd/io/extensions.rs | 2 | ||||
| -rw-r--r-- | src/libstd/io/fs.rs | 1 | ||||
| -rw-r--r-- | src/libstd/io/mem.rs | 4 | ||||
| -rw-r--r-- | src/libstd/io/mod.rs | 1 | ||||
| -rw-r--r-- | src/libstd/io/net/ip.rs | 3 |
7 files changed, 2 insertions, 11 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index a01787c286b..49c688da31c 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -13,7 +13,6 @@ //! Buffering wrappers for I/O traits use cmp; -use collections::Collection; use io::{Reader, Writer, Stream, Buffer, DEFAULT_BUF_SIZE, IoResult}; use iter::ExactSize; use ops::Drop; diff --git a/src/libstd/io/comm_adapters.rs b/src/libstd/io/comm_adapters.rs index 91f3f38f89d..c925208c3ee 100644 --- a/src/libstd/io/comm_adapters.rs +++ b/src/libstd/io/comm_adapters.rs @@ -10,7 +10,6 @@ use clone::Clone; use cmp; -use collections::Collection; use comm::{Sender, Receiver}; use io; use option::{None, Some}; diff --git a/src/libstd/io/extensions.rs b/src/libstd/io/extensions.rs index 06ed183e936..6d0b8ebc3d9 100644 --- a/src/libstd/io/extensions.rs +++ b/src/libstd/io/extensions.rs @@ -15,7 +15,6 @@ // FIXME: Not sure how this should be structured // FIXME: Iteration should probably be considered separately -use collections::{Collection, MutableSeq}; use io::{IoError, IoResult, Reader}; use io; use iter::Iterator; @@ -502,7 +501,6 @@ mod test { mod bench { extern crate test; - use collections::Collection; use prelude::*; use self::test::Bencher; diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index f193ce8cffa..c8524676a6d 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -54,7 +54,6 @@ fs::unlink(&path); use c_str::ToCStr; use clone::Clone; -use collections::{Collection, MutableSeq}; use io::standard_error; use io::{FilePermission, Write, UnstableFileStat, Open, FileAccess, FileMode}; use io::{IoResult, IoError, FileStat, SeekStyle, Seek, Writer, Reader}; diff --git a/src/libstd/io/mem.rs b/src/libstd/io/mem.rs index 2f6dd7e4795..60104365817 100644 --- a/src/libstd/io/mem.rs +++ b/src/libstd/io/mem.rs @@ -13,13 +13,11 @@ //! Readers and Writers for in-memory buffers use cmp::min; -use collections::Collection; use option::None; use result::{Err, Ok}; use io; use io::{Reader, Writer, Seek, Buffer, IoError, SeekStyle, IoResult}; -use slice; -use slice::AsSlice; +use slice::{mod, AsSlice, ImmutableSlice}; use vec::Vec; const BUF_CAPACITY: uint = 128; diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 6d6c0c0dd75..c6f237ff1da 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -222,7 +222,6 @@ responding to errors that may occur while attempting to read the numbers. #![deny(unused_must_use)] use char::Char; -use collections::Collection; use default::Default; use fmt; use int; diff --git a/src/libstd/io/net/ip.rs b/src/libstd/io/net/ip.rs index e93af744699..f4f3be13f66 100644 --- a/src/libstd/io/net/ip.rs +++ b/src/libstd/io/net/ip.rs @@ -15,13 +15,12 @@ #![allow(missing_docs)] -use collections::Collection; use fmt; use from_str::FromStr; use iter::Iterator; use option::{Option, None, Some}; use str::StrSlice; -use slice::{MutableCloneableSlice, MutableSlice}; +use slice::{MutableCloneableSlice, MutableSlice, ImmutableSlice}; pub type Port = u16; |
