fix: Resolve serde lifetime error in ApiStatus struct

Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
Chaos Rogers 2025-07-21 21:21:41 +01:00
parent 6ed1fc31e7
commit 060cff4089

View file

@ -20,8 +20,8 @@ struct ApiStatus {
system_clock: String, system_clock: String,
timecode_delta_ms: i64, timecode_delta_ms: i64,
timecode_delta_frames: i64, timecode_delta_frames: i64,
sync_status: &'static str, sync_status: String,
jitter_status: &'static str, jitter_status: String,
lock_ratio: f64, lock_ratio: f64,
ntp_active: bool, ntp_active: bool,
interfaces: Vec<String>, interfaces: Vec<String>,
@ -83,8 +83,8 @@ async fn get_status(data: web::Data<AppState>) -> impl Responder {
system_clock, system_clock,
timecode_delta_ms: avg_delta, timecode_delta_ms: avg_delta,
timecode_delta_frames: delta_frames, timecode_delta_frames: delta_frames,
sync_status, sync_status: sync_status.to_string(),
jitter_status, jitter_status: jitter_status.to_string(),
lock_ratio, lock_ratio,
ntp_active, ntp_active,
interfaces, interfaces,