Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
madninja committed Oct 3, 2023
1 parent b705d56 commit 7692c16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/beaconer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ fn mk_beacon_offset(key: &PublicKey, interval: Duration) -> Duration {
use rand::{Rng, SeedableRng};
use sha2::Digest;

let hash = sha2::Sha256::digest(key.to_vec());
let hash = sha2::Sha256::digest(&key.to_vec());
let mut rng = rand::rngs::StdRng::from_seed(*hash.as_ref());
Duration::seconds(rng.gen_range(0..interval.whole_seconds()))
}
Expand Down

0 comments on commit 7692c16

Please sign in to comment.