diff --git a/lib/channel/src/lib.rs b/lib/channel/src/lib.rs index 16efe5c8..c7465aab 100644 --- a/lib/channel/src/lib.rs +++ b/lib/channel/src/lib.rs @@ -183,7 +183,7 @@ impl Channel { /// notify all OnDemand with an event listener fn notify_all_on_demand(&self) { - self.on_demand_events.notify(std::usize::MAX); + self.on_demand_events.notify(usize::MAX); } /// create a listener so an OnDemand can get notice when demand has been requested @@ -199,7 +199,7 @@ impl Channel { /// notify all senders with an event listener fn notify_all_senders(&self) { - self.sender_events.notify(std::usize::MAX); + self.sender_events.notify(usize::MAX); } /// notify a single receiver with an event listener @@ -209,7 +209,7 @@ impl Channel { /// notify all receivers with an event listener fn notify_all_receivers(&self) { - self.receiver_events.notify(std::usize::MAX); + self.receiver_events.notify(usize::MAX); } /// create a listener so a sender can get notice when it can make progress diff --git a/lib/config/src/lib.rs b/lib/config/src/lib.rs index 92d57141..82262ca1 100644 --- a/lib/config/src/lib.rs +++ b/lib/config/src/lib.rs @@ -599,7 +599,7 @@ impl FromYaml for RangeProviderPreProcessed { let mut saw_opening = false; let mut start = 0; - let mut end = std::i64::MAX; + let mut end = i64::MAX; let mut step = NonZeroU16::new(1).expect("1 is non-zero"); let mut repeat = false; let mut unique = false; @@ -3193,7 +3193,7 @@ mod tests { "range: {}", Some(ProviderPreProcessed::Range(RangeProviderPreProcessed { start: 0, - end: std::i64::MAX, + end: i64::MAX, step: NonZeroU16::new(1).expect("1 is non-zero"), repeat: false, unique: false, diff --git a/lib/config/src/select_parser.rs b/lib/config/src/select_parser.rs index fe67a7b4..056be8fb 100644 --- a/lib/config/src/select_parser.rs +++ b/lib/config/src/select_parser.rs @@ -615,7 +615,7 @@ pub(super) fn f64_value(json: &json::Value) -> f64 { if let Some(f) = json.as_f64() { f } else { - std::f64::NAN + f64::NAN } } @@ -862,7 +862,7 @@ static INFIX_OPERATOR_PRECEDENCE: [u8; 13] = [ ]; fn to_json_number(n: f64) -> json::Value { - if n - n.trunc() < std::f64::EPSILON { + if (n - n.trunc()).abs() < f64::EPSILON { (n as u64).into() } else { n.into() diff --git a/src/request.rs b/src/request.rs index 5cc9aa8c..2fe60f44 100644 --- a/src/request.rs +++ b/src/request.rs @@ -200,6 +200,7 @@ impl ProviderStream for providers::Provider { pub struct BuilderContext { pub config: config::Config, + #[allow(dead_code)] pub config_path: PathBuf, // the http client pub client: diff --git a/src/stats.rs b/src/stats.rs index 8a3edf0b..c25085f5 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -603,6 +603,7 @@ pub enum StatsMessage { pub struct ResponseStat { pub kind: StatKind, pub rtt: Option, + #[allow(dead_code)] pub time: SystemTime, pub tags: Arc, }