From 2dc32256313563b66cdedf9ae85410074ed57b25 Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Thu, 24 Oct 2019 14:55:54 -0400 Subject: [PATCH] Drop use of hashbrown Since Rust 1.36, this is the default HashMap implementation so there is no need to pull in an external crate. This essentially reverts 636412f2a2870f0ceb57a559492d8fa788064a00. --- Cargo.toml | 1 - NEWS.md | 4 ---- src/lib.rs | 3 +-- src/nodes/dir.rs | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 30673b9..37b148f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ env_logger = "0.5" failure = "~0.1.2" fuse = "0.3" getopts = "0.2" -hashbrown = "0.1" log = "0.4" nix = "0.12" serde = "1.0" diff --git a/NEWS.md b/NEWS.md index c26b4c9..ec772db 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,10 +4,6 @@ **STILL UNDER DEVELOPMENT; NOT RELEASED YET.** -* Switched to the hashbrown implementation of Swiss Tables for hash maps, - which brings an up to 1% performance improvement during Bazel builds - that use sandboxfs. - * Fixed the definition of `--input` and `--output` to require an argument, which makes `--foo bar` and `--foo=bar` equivalent. This can be thought to break backwards compatibility but, in reality, it does not. The previous diff --git a/src/lib.rs b/src/lib.rs index 802f097..3fd12be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,6 @@ #[cfg(feature = "profiling")] extern crate cpuprofiler; #[macro_use] extern crate failure; extern crate fuse; -extern crate hashbrown; #[macro_use] extern crate log; extern crate nix; extern crate serde_derive; @@ -41,9 +40,9 @@ extern crate signal_hook; extern crate time; use failure::{Fallible, Error, ResultExt}; -use hashbrown::HashMap; use nix::errno::Errno; use nix::{sys, unistd}; +use std::collections::HashMap; use std::ffi::OsStr; use std::fmt; use std::fs; diff --git a/src/nodes/dir.rs b/src/nodes/dir.rs index d817466..46a494c 100644 --- a/src/nodes/dir.rs +++ b/src/nodes/dir.rs @@ -17,10 +17,10 @@ extern crate time; use {Cache, create_as, IdGenerator}; use failure::{Fallible, ResultExt}; -use hashbrown::HashMap; use nix::{errno, fcntl, sys, unistd}; use nix::dir as rawdir; use nodes::{ArcHandle, ArcNode, AttrDelta, Handle, KernelError, Node, NodeResult, conv, setattr}; +use std::collections::HashMap; use std::ffi::{OsStr, OsString}; use std::os::unix::ffi::OsStrExt; use std::os::unix::fs::{self as unix_fs, DirBuilderExt, OpenOptionsExt};