diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 16:26:15 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 16:26:15 -0800 |
| commit | a8820f7a2df1932918dbaa5d123486d86f7fb008 (patch) | |
| tree | e4d6d36b5710f4b707472017c823aefb14cfd960 /src/libstd/io | |
| parent | 899eb65b29bf666b05b155a3d4cc6002ac8cb26a (diff) | |
| parent | b7832ed0b42a2d6512e3f8d09605986237f02ed5 (diff) | |
| download | rust-a8820f7a2df1932918dbaa5d123486d86f7fb008.tar.gz rust-a8820f7a2df1932918dbaa5d123486d86f7fb008.zip | |
rollup merge of #20328: huonw/attack-of-the-clones
It's useful to be able to save state.
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/fs.rs | 1 | ||||
| -rw-r--r-- | src/libstd/io/util.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index caa6590bb28..e4c31ff8dd3 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -558,6 +558,7 @@ pub fn walk_dir(path: &Path) -> IoResult<Directories> { } /// An iterator that walks over a directory +#[deriving(Clone)] pub struct Directories { stack: Vec<Path>, } diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 90d7c1388a1..2a98067c970 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -163,6 +163,7 @@ impl Writer for MultiWriter { /// A `Reader` which chains input from multiple `Reader`s, reading each to /// completion before moving onto the next. +#[deriving(Clone)] pub struct ChainedReader<I, R> { readers: I, cur_reader: Option<R>, @@ -246,6 +247,7 @@ pub fn copy<R: Reader, W: Writer>(r: &mut R, w: &mut W) -> io::IoResult<()> { } /// An adaptor converting an `Iterator<u8>` to a `Reader`. +#[deriving(Clone)] pub struct IterReader<T> { iter: T, } |
