refactor(time): consolidate ClockId usage via the public time::Clock trait
Rust CI / cargo fmt (push) Successful in 15s
Rust CI / cargo clippy (push) Failing after 35s
Rust CI / cargo check (x86_64-unknown-linux-gnu) (push) Failing after 32s
Rust CI / cargo check (x86_64-unknown-linux-musl) (push) Failing after 9s
Rust CI / cargo test (x86_64-unknown-linux-gnu) (push) Failing after 41s
Rust CI / cargo test (x86_64-unknown-linux-musl) (push) Failing after 7s
Rust CI / cargo doc (push) Successful in 37s
Supply chain / actionlint (push) Successful in 8s
Supply chain / cargo-deny bans licenses sources (push) Failing after 1m47s
Supply chain / cargo-deny advisories (push) Failing after 1m49s
Rust CI / cargo fmt (push) Successful in 15s
Rust CI / cargo clippy (push) Failing after 35s
Rust CI / cargo check (x86_64-unknown-linux-gnu) (push) Failing after 32s
Rust CI / cargo check (x86_64-unknown-linux-musl) (push) Failing after 9s
Rust CI / cargo test (x86_64-unknown-linux-gnu) (push) Failing after 41s
Rust CI / cargo test (x86_64-unknown-linux-musl) (push) Failing after 7s
Rust CI / cargo doc (push) Successful in 37s
Supply chain / actionlint (push) Successful in 8s
Supply chain / cargo-deny bans licenses sources (push) Failing after 1m47s
Supply chain / cargo-deny advisories (push) Failing after 1m49s
Remove direct `rustix::time::ClockId` imports by centralizing its dependency within the `time` module.
This commit is contained in:
5 files changed
+1
-5
No files matched your search
@@ -7,7 +7,6 @@ use crate::settings::{MeasurementType, ObservabilityProtocol};
|
|||||||
use crate::time::{ClockSample, Realtime};
|
use crate::time::{ClockSample, Realtime};
|
||||||
use flume::{Receiver, RecvTimeoutError, Sender};
|
use flume::{Receiver, RecvTimeoutError, Sender};
|
||||||
use log::{error, info, warn};
|
use log::{error, info, warn};
|
||||||
use rustix::time::ClockId;
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
use std::net::{IpAddr, TcpStream, UdpSocket};
|
use std::net::{IpAddr, TcpStream, UdpSocket};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ use crate::time::{ClockSample, Monotonic};
|
|||||||
use icmp_socket2::Icmpv4Message;
|
use icmp_socket2::Icmpv4Message;
|
||||||
use icmp_socket2::Icmpv4Packet;
|
use icmp_socket2::Icmpv4Packet;
|
||||||
use icmp_socket2::packet::WithEchoRequest;
|
use icmp_socket2::packet::WithEchoRequest;
|
||||||
use rustix::time::ClockId;
|
|
||||||
|
|
||||||
pub struct PingerICMPEchoListener {}
|
pub struct PingerICMPEchoListener {}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ use crate::time::{ClockSample, Realtime};
|
|||||||
use icmp_socket2::Icmpv4Message;
|
use icmp_socket2::Icmpv4Message;
|
||||||
use icmp_socket2::Icmpv4Packet;
|
use icmp_socket2::Icmpv4Packet;
|
||||||
use icmp_socket2::packet::WithTimestampRequest;
|
use icmp_socket2::packet::WithTimestampRequest;
|
||||||
use rustix::time::ClockId;
|
|
||||||
use std::net::IpAddr;
|
use std::net::IpAddr;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ use crate::time::{ClockSample, Realtime};
|
|||||||
use crate::util::{ArcRwLock, RwLockExt};
|
use crate::util::{ArcRwLock, RwLockExt};
|
||||||
use flume::{Receiver, Sender};
|
use flume::{Receiver, Sender};
|
||||||
use log::{debug, info, warn};
|
use log::{debug, info, warn};
|
||||||
use rustix::time::ClockId;
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::net::IpAddr;
|
use std::net::IpAddr;
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ use std::marker::PhantomData;
|
|||||||
|
|
||||||
use rustix::time::{ClockId, clock_gettime};
|
use rustix::time::{ClockId, clock_gettime};
|
||||||
|
|
||||||
trait Clock {
|
pub trait Clock {
|
||||||
const ID: ClockId;
|
const ID: ClockId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user