[yew-devel] [PATCH yew-comp] tasks: remove unnecessary 'round'
Dominik Csapak
d.csapak at proxmox.com
Mon Jan 20 13:41:46 CET 2025
this would only make sense if there were some milliseconds set,
but even then we want to truncate the number. So simply remove the
round, since `f64 as u64` does that already
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/tasks.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tasks.rs b/src/tasks.rs
index 56da7dd..1b65c8e 100644
--- a/src/tasks.rs
+++ b/src/tasks.rs
@@ -215,7 +215,7 @@ impl LoadableComponent for ProxmoxTasks {
since.set_hours(0);
since.set_minutes(0);
since.set_seconds(0);
- let since = (since.get_time() / 1000.0).round() as u64;
+ let since = (since.get_time() / 1000.0) as u64;
filter["since"] = since.into();
}
@@ -224,7 +224,7 @@ impl LoadableComponent for ProxmoxTasks {
until.set_hours(23);
until.set_minutes(59);
until.set_seconds(59);
- let until = (until.get_time() / 1000.0).round() as u64;
+ let until = (until.get_time() / 1000.0) as u64;
filter["until"] = until.into();
}
--
2.39.5
More information about the yew-devel
mailing list