Skip to content

Commit 4e6994d

Browse files
committed
librustc/back/rpath.rs: oldmap -> LinearSet
1 parent d30fdbb commit 4e6994d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/librustc/back/rpath.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ use core::os;
1818
use core::uint;
1919
use core::util;
2020
use core::vec;
21-
use std::oldmap::HashMap;
22-
use std::oldmap;
21+
use core::hashmap::linear::LinearSet;
2322

2423
pure fn not_win32(os: session::os) -> bool {
2524
match os {
@@ -187,16 +186,14 @@ pub fn get_install_prefix_rpath(target_triple: &str) -> Path {
187186
}
188187
189188
pub fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] {
190-
let set = oldmap::HashMap();
189+
let mut set = LinearSet::new();
191190
let mut minimized = ~[];
192191
for rpaths.each |rpath| {
193-
let s = rpath.to_str();
194-
if !set.contains_key(&s) {
195-
minimized.push(/*bad*/copy *rpath);
196-
set.insert(s, ());
192+
if set.insert(rpath.to_str()) {
193+
minimized.push(copy *rpath);
197194
}
198195
}
199-
return minimized;
196+
minimized
200197
}
201198
202199
#[cfg(unix)]

0 commit comments

Comments
 (0)