diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-02-08 21:04:28 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-02-08 21:22:54 -0500 |
| commit | 4e6994dbfa3c32ef6a560c9ab2d940a5b032eef4 (patch) | |
| tree | 2d7fe9c64cad917df6641c805e6fd576ffde8674 /src | |
| parent | d30fdbb3575d668223a9f0b6a4a4d2854d194598 (diff) | |
| download | rust-4e6994dbfa3c32ef6a560c9ab2d940a5b032eef4.tar.gz rust-4e6994dbfa3c32ef6a560c9ab2d940a5b032eef4.zip | |
librustc/back/rpath.rs: oldmap -> LinearSet
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/back/rpath.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/librustc/back/rpath.rs b/src/librustc/back/rpath.rs index 6fa90ac1ef0..4cca6757cc3 100644 --- a/src/librustc/back/rpath.rs +++ b/src/librustc/back/rpath.rs @@ -18,8 +18,7 @@ use core::os; use core::uint; use core::util; use core::vec; -use std::oldmap::HashMap; -use std::oldmap; +use core::hashmap::linear::LinearSet; pure fn not_win32(os: session::os) -> bool { match os { @@ -187,16 +186,14 @@ pub fn get_install_prefix_rpath(target_triple: &str) -> Path { } pub fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] { - let set = oldmap::HashMap(); + let mut set = LinearSet::new(); let mut minimized = ~[]; for rpaths.each |rpath| { - let s = rpath.to_str(); - if !set.contains_key(&s) { - minimized.push(/*bad*/copy *rpath); - set.insert(s, ()); + if set.insert(rpath.to_str()) { + minimized.push(copy *rpath); } } - return minimized; + minimized } #[cfg(unix)] |
