From 4e6994dbfa3c32ef6a560c9ab2d940a5b032eef4 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 8 Feb 2013 21:04:28 -0500 Subject: [PATCH] librustc/back/rpath.rs: oldmap -> LinearSet --- src/librustc/back/rpath.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/librustc/back/rpath.rs b/src/librustc/back/rpath.rs index 6fa90ac1ef0c9..4cca6757cc394 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)]