From: FUJITA Tomonori <tomo@flapping.org>
To: a.hindborg@kernel.org
Cc: fujita.tomonori@gmail.com, frederic@kernel.org, lyude@redhat.com,
tglx@kernel.org, anna-maria@linutronix.de, jstultz@google.com,
sboyd@kernel.org, ojeda@kernel.org, gary@garyguo.net,
bjorn3_gh@protonmail.com, lossin@kernel.org,
aliceryhl@google.com, tmgross@umich.edu, dakr@kernel.org,
boqun@kernel.org, daniel.almeida@collabora.com,
tamird@kernel.org, acourbot@nvidia.com, work@onurozkan.dev,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] rust: time: implement `Display` for `Delta`
Date: Wed, 04 Nov 2026 18:08:54 +0900 (JST) [thread overview]
Message-ID: <20261104.180854.547774168466136920.tomo@flapping.org> (raw)
In-Reply-To: <20261103-time-delta-display-v2-1-b01b1fe9ff9f@kernel.org>
On Tue, 03 Nov 2026 16:23:40 +0100
Andreas Hindborg <a.hindborg@kernel.org> wrote:
> Implement the `Display` trait for `Delta` so that it can be displayed by a
> formatter.
[...]
> - Drop the `rnull` user, which will call `Delta::as_nanos` instead (Gary).
Now that the rnull user has been dropped, I wonder if we need this
now.
If we want a readable format with a unit, Debug might be a better fit.
core::time::Duration implements only Debug, not Display, and its Debug
output includes the unit (e.g. 1.5s). Debug output is not expected to
be stable, so we could change the format later. Users that need a
fixed format can use as_nanos(), like rnull does.
What do you think?
next prev parent reply other threads:[~2026-11-04 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 15:23 Andreas Hindborg
2026-11-04 9:08 ` FUJITA Tomonori [this message]
2026-11-04 10:07 ` Andreas Hindborg
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=20261104.180854.547774168466136920.tomo@flapping.org \
--to=tomo@flapping.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=anna-maria@linutronix.de \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=frederic@kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tamird@kernel.org \
--cc=tglx@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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
all inboxes | Powered by JetHome®