From 93f3f5b1552489dbee03020505d896f01fd53852 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Sat, 18 Aug 2018 13:55:43 +0300 Subject: Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc. --- src/librustc_codegen_llvm/back/linker.rs | 4 ++-- src/librustc_codegen_llvm/back/rpath.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/back/linker.rs b/src/librustc_codegen_llvm/back/linker.rs index a429e8f2d81..24f6156bd76 100644 --- a/src/librustc_codegen_llvm/back/linker.rs +++ b/src/librustc_codegen_llvm/back/linker.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::collections::HashMap; +use rustc_data_structures::fx::FxHashMap; use std::ffi::{OsStr, OsString}; use std::fs::{self, File}; use std::io::prelude::*; @@ -30,7 +30,7 @@ use serialize::{json, Encoder}; /// For all the linkers we support, and information they might /// need out of the shared crate context before we get rid of it. pub struct LinkerInfo { - exports: HashMap>, + exports: FxHashMap>, } impl LinkerInfo { diff --git a/src/librustc_codegen_llvm/back/rpath.rs b/src/librustc_codegen_llvm/back/rpath.rs index 2c3a143646c..aa4f7688b0f 100644 --- a/src/librustc_codegen_llvm/back/rpath.rs +++ b/src/librustc_codegen_llvm/back/rpath.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::collections::HashSet; +use rustc_data_structures::fx::FxHashSet; use std::env; use std::path::{Path, PathBuf}; use std::fs; @@ -172,7 +172,7 @@ fn get_install_prefix_rpath(config: &mut RPathConfig) -> String { } fn minimize_rpaths(rpaths: &[String]) -> Vec { - let mut set = HashSet::new(); + let mut set = FxHashSet::default(); let mut minimized = Vec::new(); for rpath in rpaths { if set.insert(rpath) { -- cgit 1.4.1-3-g733a5