diff --git a/src/api.rs b/src/api.rs index 40be48e..522da01 100644 --- a/src/api.rs +++ b/src/api.rs @@ -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 { diff --git a/src/ptp.rs b/src/ptp.rs index 732abfb..cb87bf3 100644 --- a/src/ptp.rs +++ b/src/ptp.rs @@ -1,4 +1,4 @@ -use chrono::{DateTime, TimeZone, Utc}; +use chrono::{DateTime, Utc}; #[derive(Debug)] pub enum PtpError { @@ -27,7 +27,8 @@ impl From 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 {