public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [yew-devel] [PATCH yew-comp] tasks: remove unnecessary 'round'
@ 2025-01-20 12:41 Dominik Csapak
  2025-01-21 15:51 ` [yew-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-01-20 12:41 UTC (permalink / raw)
  To: yew-devel

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@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



_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [yew-devel] applied: [PATCH yew-comp] tasks: remove unnecessary 'round'
  2025-01-20 12:41 [yew-devel] [PATCH yew-comp] tasks: remove unnecessary 'round' Dominik Csapak
@ 2025-01-21 15:51 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-01-21 15:51 UTC (permalink / raw)
  To: Yew framework devel list at Proxmox, Dominik Csapak

Am 20.01.25 um 13:41 schrieb Dominik Csapak:
> 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@proxmox.com>
> ---
>  src/tasks.rs | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
>

applied, thanks!


_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-21 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-20 12:41 [yew-devel] [PATCH yew-comp] tasks: remove unnecessary 'round' Dominik Csapak
2025-01-21 15:51 ` [yew-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal