Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions src/platform/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -472,7 +472,7 @@ impl OsIpcChannel {
pub struct OsIpcReceiverSet {
incrementor: RangeFrom<u64>,
poll: Poll,
pollfds: HashMap<Token, PollEntry, BuildHasherDefault<FnvHasher>>,
pollfds: HashMap<Token, PollEntry, BuildHasherDefault<FxHasher>>,
events: Events,
}

Expand All @@ -487,11 +487,11 @@ impl Drop for OsIpcReceiverSet {

impl OsIpcReceiverSet {
pub fn new() -> Result<OsIpcReceiverSet, UnixError> {
let fnv = BuildHasherDefault::<FnvHasher>::default();
let fx = BuildHasherDefault::<FxHasher>::default();
Ok(OsIpcReceiverSet {
incrementor: 0..,
poll: Poll::new()?,
pollfds: HashMap::with_hasher(fnv),
pollfds: HashMap::with_hasher(fx),
events: Events::with_capacity(10),
})
}
Expand Down