Re: [PATCH v1 1/2] rust: time: Rename Delta's methods as_micros_ceil and as_millis
From: Miguel Ojeda
Date: Wed Jun 18 2025 - 07:04:57 EST
On Wed, Jun 18, 2025 at 11:52 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> Yeah I think using as_* naming for cases other than borrowed->borrowed
> is relatively common for Copy types.
Hmm... from a quick look, I only see a few: on raw pointers, `NonNull`
and `Component`. But maybe I am grepping wrong.
There are a bunch on unstable and private stuff, e.g.
`ptr::Alignment`, so it may become a bit more common over time.
So far it seems most of them take `&self`, which seems to align with
the guidelines.
Either way, I agree that what is important is that it is a "free"
conversion/access/...
Cheers,
Miguel