From 9c0c8733e2d1efd76e6409505f4b61ff5bb41e01 Mon Sep 17 00:00:00 2001 From: Sachymetsu Date: Fri, 27 Feb 2026 06:48:51 +0000 Subject: [PATCH] Fix warning timestamp deserialisation --- src/device.rs | 4 ---- src/views/monitoring.rs | 2 +- 2 file(s) changed, 1 insertion(s)(+), 5 deletion(s)(-) diff --git a/src/device.rs b/src/device.rs --- a/src/device.rs +++ b/src/device.rs @@ -59,10 +59,6 @@ pub struct Timestamp(pub jiff::Timestamp); impl Timestamp { - pub fn from_seconds(stamp: i64) -> Result { - jiff::Timestamp::from_second(stamp).map(Self) - } - pub fn from_microseconds(stamp: i64) -> Result { jiff::Timestamp::from_microsecond(stamp).map(Self) } diff --git a/src/views/monitoring.rs b/src/views/monitoring.rs --- a/src/views/monitoring.rs +++ b/src/views/monitoring.rs @@ -140,7 +140,7 @@ } StrikerResponse::Update(Update::Warning { timestamp, level }) => { entity.with_related::(( - Timestamp::from_seconds(timestamp)?, + Timestamp::from_microseconds(timestamp)?, StormLevel(level), )); } -- tangled.sh