Skip to content

Commit

Permalink
update deps for madsim
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <wangrunji0408@163.com>
  • Loading branch information
wangrunji0408 committed Jan 5, 2024
1 parent dc3e7a0 commit e9fe959
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions madsim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ tracing = "0.1"
tracing-subscriber = "0.3"

[target.'cfg(madsim)'.dependencies]
ahash = "0.7"
async-channel = "1.6"
ahash = "0.8"
async-channel = "2"
async-stream = "0.3"
async-task = "4.4"
downcast-rs = "1.2"
Expand All @@ -43,7 +43,7 @@ panic-message = "0.3"
rand_xoshiro = "0.6"
rustversion = "1"
tokio = { version = "1", features = ["rt", "sync"] }
toml = "0.7"
toml = "0.8"

[target.'cfg(not(madsim))'.dependencies]
async-ucx = { version = "0.1", features = ["event"], optional = true }
Expand All @@ -60,7 +60,7 @@ tokio-util = { version = "0.7", features = ["codec"] }
# mad_rpc = { git = "https://github.com/madsys-dev/madrpc", rev = "2be4b02", optional = true }

[dev-dependencies]
criterion = "0.4"
criterion = "0.5"
structopt = "0.3"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }

Expand Down
10 changes: 2 additions & 8 deletions madsim/src/sim/config.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
//! Simulation configuration.

use std::{
hash::{Hash, Hasher},
str::FromStr,
};
use std::{hash::Hash, str::FromStr};

use crate::net::{self, tcp};
use ahash::AHasher;
use serde::{Deserialize, Serialize};

/// Simulation configuration.
Expand All @@ -25,9 +21,7 @@ pub struct Config {
impl Config {
/// Returns the hash value of this config.
pub fn hash(&self) -> u64 {
let mut hasher = AHasher::new_with_keys(0, 0);
Hash::hash(self, &mut hasher);
hasher.finish()
ahash::RandomState::with_seed(0).hash_one(self)
}
}

Expand Down

0 comments on commit e9fe959

Please sign in to comment.