Re: [PATCH 1/2] rust: time: Implement Add<Delta>/Sub<Delta> for Instant
From: Alice Ryhl
Date: Mon Jul 28 2025 - 14:23:47 EST
On Mon, Jul 28, 2025 at 8:21 PM Lyude Paul <lyude@xxxxxxxxxx> wrote:
>
> On Sun, 2025-07-27 at 07:33 +0000, Alice Ryhl wrote:
> >
> > I'm not so sure what to think about this clamp logic. Maybe it is the
> > best way to go ...
>
> Yeah - I was kinda hoping the mailing list would give me the direction to go
> on this one. The other thing that I considered that might make more sense was
> instead to implement these so that when over/underflow checking is enabled we
> panic when we get a value out of the range of 0 to KTIME_MAX. Would that make
> more sense?
Well, it would certainly be more consistent.
What does your use-case need?
Alice