From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [yew-devel] [PATCH yew-comp] tasks: remove unnecessary 'round'
Date: Mon, 20 Jan 2025 13:41:46 +0100 [thread overview]
Message-ID: <20250120124146.2952068-1-d.csapak@proxmox.com> (raw)
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
next reply other threads:[~2025-01-20 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 12:41 Dominik Csapak [this message]
2025-01-21 15:51 ` [yew-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250120124146.2952068-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=yew-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox