diff options
| author | bors <bors@rust-lang.org> | 2015-03-21 05:25:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-21 05:25:21 +0000 |
| commit | ecf8c64e1b1b60f228f0c472c0b0dab4a5b5aa61 (patch) | |
| tree | 03752d10ba340b85b8720647c7919a97b21d694b /src/libstd/fs | |
| parent | e2fa53e593a854a609ae9efe5a1bbe15265f0a6f (diff) | |
| parent | 212e03181e422f569b6426bc08b713a9efc0d0eb (diff) | |
| download | rust-ecf8c64e1b1b60f228f0c472c0b0dab4a5b5aa61.tar.gz rust-ecf8c64e1b1b60f228f0c472c0b0dab4a5b5aa61.zip | |
Auto merge of #23470 - alexcrichton:less-prelude, r=aturon
This commit removes the reexports of `old_io` traits as well as `old_path` types and traits from the prelude. This functionality is now all deprecated and needs to be removed to make way for other functionality like `Seek` in the `std::io` module (currently reexported as `NewSeek` in the io prelude). Closes #23377 Closes #23378
Diffstat (limited to 'src/libstd/fs')
| -rw-r--r-- | src/libstd/fs/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/fs/mod.rs b/src/libstd/fs/mod.rs index 4b319cdd437..7df6d6887a2 100644 --- a/src/libstd/fs/mod.rs +++ b/src/libstd/fs/mod.rs @@ -801,6 +801,7 @@ mod tests { use prelude::v1::*; use io::prelude::*; + use env; use fs::{self, File, OpenOptions}; use io::{ErrorKind, SeekFrom}; use path::PathBuf; @@ -848,8 +849,7 @@ mod tests { } pub fn tmpdir() -> TempDir { - let s = os::tmpdir(); - let p = Path2::new(s.as_str().unwrap()); + let p = env::temp_dir(); let ret = p.join(&format!("rust-{}", rand::random::<u32>())); check!(fs::create_dir(&ret)); TempDir(ret) @@ -1082,7 +1082,7 @@ mod tests { let dir = &tmpdir.join("di_readdir"); check!(fs::create_dir(dir)); let prefix = "foo"; - for n in range(0, 3) { + for n in 0..3 { let f = dir.join(&format!("{}.txt", n)); let mut w = check!(File::create(&f)); let msg_str = format!("{}{}", prefix, n.to_string()); |
