fix: derive Debug for PtpClock/StatimeDaemon; adjust imports; use Config::default in tests

Co-authored-by: aider (openai/gpt-5) <aider@aider.chat>
This commit is contained in:
Chaos Rogers 2025-10-26 12:19:55 +00:00
parent 5ed8198a8e
commit 76da5ccdcf
2 changed files with 6 additions and 2 deletions

View file

@ -315,6 +315,7 @@ mod tests {
timeturner_offset: TimeturnerOffset::default(),
default_nudge_ms: 2,
auto_sync_enabled: false,
..Config::default()
}));
let log_buffer = Arc::new(Mutex::new(VecDeque::new()));
web::Data::new(AppState {

View file

@ -1,4 +1,4 @@
use chrono::{DateTime, TimeZone, Utc};
use chrono::{DateTime, Utc};
#[derive(Debug)]
pub enum PtpError {
@ -27,7 +27,8 @@ impl From<std::io::Error> for PtpError {
#[cfg(target_os = "linux")]
mod linux {
use super::{DateTime, PtpError, TimeZone, Utc};
use super::{DateTime, PtpError, Utc};
use chrono::TimeZone;
use libc::{clockid_t, timespec, CLOCK_REALTIME};
use std::fs::File;
use std::os::fd::AsRawFd;
@ -93,6 +94,7 @@ mod linux {
mod non_linux {
use super::{DateTime, PtpError, Utc};
#[derive(Debug)]
pub struct PtpClock;
impl PtpClock {
@ -256,6 +258,7 @@ mod statime_nonlinux_mod {
}
}
#[derive(Debug)]
pub struct StatimeDaemon;
impl StatimeDaemon {