Skip to content

Commit

Permalink
Fix an unrelated type resolution error
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Dec 28, 2021
1 parent a9104ff commit 8c2630b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions zebra-network/src/meta_addr/tests/prop.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//! Randomised property tests for MetaAddr.
use std::{
collections::HashMap,
convert::{TryFrom, TryInto},
env,
net::SocketAddr,
str::FromStr,
sync::Arc,
collections::HashMap, convert::TryFrom, env, net::SocketAddr, str::FromStr, sync::Arc,
time::Duration,
};

Expand Down Expand Up @@ -208,7 +203,7 @@ proptest! {
let overall_test_time: Duration = MIN_PEER_RECONNECTION_DELAY * LIVE_PEER_INTERVALS;
// Advance the clock by this much for every peer change
let peer_change_interval: Duration =
overall_test_time / MAX_ADDR_CHANGE.try_into().unwrap();
overall_test_time / u32::try_from(MAX_ADDR_CHANGE).unwrap();

prop_assert!(
u32::try_from(MAX_ADDR_CHANGE).unwrap() >= 3 * LIVE_PEER_INTERVALS,
Expand Down Expand Up @@ -309,7 +304,7 @@ proptest! {
let overall_test_time: Duration = MIN_PEER_RECONNECTION_DELAY * LIVE_PEER_INTERVALS;
// Advance the clock by this much for every peer change
let peer_change_interval: Duration =
overall_test_time / MAX_ADDR_CHANGE.try_into().unwrap();
overall_test_time / u32::try_from(MAX_ADDR_CHANGE).unwrap();

prop_assert!(
u32::try_from(MAX_ADDR_CHANGE).unwrap() >= 3 * LIVE_PEER_INTERVALS,
Expand Down

0 comments on commit 8c2630b

Please sign in to comment.