diff options
| author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2026-10-02 14:04:25 +0900 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-10-12 07:31:20 +0200 |
| commit | cad3f4daef8a8793a953c632c2fcb0a6560da46a (patch) | |
| tree | 5d3be257f05c7ad6715df89348af9a1b0f9dd366 /scripts/Makefile.thinlto | |
| parent | a12f22b2c9398541d75d86d18be0a9ec92909fe0 (diff) | |
| download | linux-cad3f4daef8a8793a953c632c2fcb0a6560da46a.tar.gz linux-cad3f4daef8a8793a953c632c2fcb0a6560da46a.zip | |
rust: time: make Delta::ZERO generic over the time unit
Delta::ZERO is defined only for Delta<Nsec>, so code that needs a zero
Delta<Jiffy> has to write Delta::from_jiffies(0).
Define ZERO for every Delta<U> instead. An integer literal cannot be
used for a generic U::Repr, so add ZERO to TimeUnit.
Suggested-by: Markus Probst <markus.probst@posteo.de>
Suggested-by: Gary Guo <gary@garyguo.net>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20261002050428.2746277-2-tomo@flapping.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
