diff --git a/Cargo.toml b/Cargo.toml index 89bb73e8..ffde680d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,6 @@ enable-slow-tests = [] [dependencies] bincode = "1" crossbeam-channel = "0.5" -fnv = "1.0.3" futures-channel = { version = "0.3.31", optional = true } futures-core = { version = "0.3.31", optional = true } libc = "0.2.162" @@ -49,6 +48,7 @@ uuid = { version = "1", features = ["v4"] } [target.'cfg(any(target_os = "linux", target_os = "openbsd", target_os = "freebsd", target_os = "illumos"))'.dependencies] mio = { version = "1.0", default-features = false, features = ["os-ext"] } +rustc-hash = "2.1" tempfile = "3.4" [target.'cfg(target_os = "macos")'.dependencies] diff --git a/src/platform/unix/mod.rs b/src/platform/unix/mod.rs index 6cb9170c..69a9b086 100644 --- a/src/platform/unix/mod.rs +++ b/src/platform/unix/mod.rs @@ -9,7 +9,6 @@ use crate::ipc::{self, IpcMessage}; use bincode; -use fnv::FnvHasher; use libc::{ self, cmsghdr, linger, CMSG_DATA, CMSG_LEN, CMSG_SPACE, MAP_FAILED, MAP_SHARED, PROT_READ, PROT_WRITE, SOCK_SEQPACKET, SOL_SOCKET, @@ -20,6 +19,7 @@ use libc::{sa_family_t, setsockopt, size_t, sockaddr, sockaddr_un, socketpair, s use libc::{EAGAIN, EWOULDBLOCK}; use mio::unix::SourceFd; use mio::{Events, Interest, Poll, Token}; +use rustc_hash::FxHasher; use std::cell::Cell; use std::cmp; use std::collections::HashMap; @@ -472,7 +472,7 @@ impl OsIpcChannel { pub struct OsIpcReceiverSet { incrementor: RangeFrom, poll: Poll, - pollfds: HashMap>, + pollfds: HashMap>, events: Events, } @@ -487,11 +487,11 @@ impl Drop for OsIpcReceiverSet { impl OsIpcReceiverSet { pub fn new() -> Result { - let fnv = BuildHasherDefault::::default(); + let fx = BuildHasherDefault::::default(); Ok(OsIpcReceiverSet { incrementor: 0.., poll: Poll::new()?, - pollfds: HashMap::with_hasher(fnv), + pollfds: HashMap::with_hasher(fx), events: Events::with_capacity(10), }) }