diff options
| author | bors <bors@rust-lang.org> | 2014-12-30 08:02:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-12-30 08:02:39 +0000 |
| commit | d2368c3c11ddab9d812c4ddec2e44579326ad347 (patch) | |
| tree | b976bc0eb040da67646a9d99bb9b901cb9f55abd /src/libstd/path | |
| parent | fea5aa656ff4349f4d3e1fea1447d26986762ae1 (diff) | |
| parent | 470ae101d6e26a6ce07292b7fca6eaed527451c7 (diff) | |
| download | rust-d2368c3c11ddab9d812c4ddec2e44579326ad347.tar.gz rust-d2368c3c11ddab9d812c4ddec2e44579326ad347.zip | |
auto merge of #20320 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/posix.rs | 2 | ||||
| -rw-r--r-- | src/libstd/path/windows.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index d941665f048..60f147eac9b 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -1239,7 +1239,7 @@ mod bench { extern crate test; use self::test::Bencher; use super::*; - use prelude::*; + use prelude::{Clone, GenericPath}; #[bench] fn join_home_dir(b: &mut Bencher) { diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 1d17ae987b2..879a96e8026 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -21,7 +21,7 @@ use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; use hash; use io::Writer; use iter::{AdditiveIterator, DoubleEndedIteratorExt, Extend}; -use iter::{Iterator, IteratorExt, Map}; +use iter::{Iterator, IteratorExt, Map, repeat}; use mem; use option::Option; use option::Option::{Some, None}; @@ -777,7 +777,7 @@ impl Path { } } } else if is_abs && comps.is_empty() { - Some(String::from_char(1, SEP)) + Some(repeat(SEP).take(1).collect()) } else { let prefix_ = s[0..prefix_len(prefix)]; let n = prefix_.len() + |
