silence warnings while dev
This commit is contained in:
2 files changed
+10
No files matched your search
@@ -6,6 +6,7 @@ use std::{
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct MeasurementStreamId(pub u64);
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum MeasurementSource {
|
||||
IcmpEcho,
|
||||
@@ -22,6 +23,7 @@ pub struct MeasurementStream {
|
||||
pub source: MeasurementSource,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum OneWayClock {
|
||||
Uncalibrated,
|
||||
@@ -68,6 +70,7 @@ pub struct SignedDuration {
|
||||
nanos: i64,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl SignedDuration {
|
||||
pub const fn from_nanos(nanos: i64) -> Self {
|
||||
Self { nanos }
|
||||
@@ -95,6 +98,7 @@ pub struct OneWayLatency {
|
||||
pub clock: OneWayClock,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct MeasurementObservation {
|
||||
pub stream: MeasurementStream,
|
||||
@@ -109,6 +113,7 @@ pub struct MeasurementObservation {
|
||||
pub one_way: Option<OneWayLatency>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl MeasurementObservation {
|
||||
pub fn rtt(&self) -> Duration {
|
||||
self.observed_at.duration_since(self.started_at)
|
||||
@@ -119,12 +124,14 @@ impl MeasurementObservation {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct MeasurementLoss {
|
||||
pub stream: MeasurementStream,
|
||||
pub started_at: Instant,
|
||||
pub detected_at: Instant,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub enum MeasurementEvent {
|
||||
Observation(MeasurementObservation),
|
||||
Loss(MeasurementLoss),
|
||||
|
||||
@@ -219,8 +219,11 @@ pub(crate) struct NetworkSettings {
|
||||
#[serde(default = "default_min_percent")]
|
||||
pub(crate) upload_min_percent: f64,
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) measurement_bind_device: Option<String>,
|
||||
#[allow(dead_code)]
|
||||
pub(crate) measurement_mark: Option<u32>,
|
||||
#[allow(dead_code)]
|
||||
pub(crate) measurement_fib: Option<u32>,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user