diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-04-09 11:45:20 +1000 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-10 15:21:58 -0700 |
| commit | 301594917fca62ffa1ca4589ac398c3196427547 (patch) | |
| tree | 086b1edfb43adc5d61a40a98d0e72b1899b523dd /src/libstd/io | |
| parent | a65411e4f7b5df78e34dcaf8061d4641f4b56412 (diff) | |
std,native,green,rustuv: make readdir return `Vec`.
Replacing `~[]`. This also makes the `walk_dir` iterator use a `Vec` internally.
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/fs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index 2fea002d419..b8a58c5cf10 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -483,7 +483,7 @@ pub fn rmdir(path: &Path) -> IoResult<()> { /// Will return an error if the provided `from` doesn't exist, the process lacks /// permissions to view the contents or if the `path` points at a non-directory /// file -pub fn readdir(path: &Path) -> IoResult<~[Path]> { +pub fn readdir(path: &Path) -> IoResult<Vec<Path>> { LocalIo::maybe_raise(|io| { io.fs_readdir(&path.to_c_str(), 0) }) @@ -498,7 +498,7 @@ pub fn walk_dir(path: &Path) -> IoResult<Directories> { /// An iterator which walks over a directory pub struct Directories { - stack: ~[Path], + stack: Vec<Path>, } impl Iterator<Path> for Directories { |
