« first day (1803 days earlier)      last day (1906 days later) » 

11:03
I dropped a comment asking for more info on the close event question
feel like it might actually be a good question once there's more detail in
 
1 hour later…
12:18
@LukasKalbertodt dude already had his answer - thanks for pointing out the crosspost
should probably voteclose
 
4 hours later…
16:49
@trentcl should be an iterator
your code is not very readable
@Stargateur yeah
@Stargateur but it made me feel smart
joking aside, I'd be interested to see how you adapt it.
17:05
meh
I don't understand how your algo work so I can't really make it differs :p
But I least my code will work if limit is u32::MAX
your work too but I think there is still a performance impact with ..=
@Stargateur Still pretty tight. I think the ..= difference washes out to the same thing, but I'm not sure.
@trentcl yeah I saw the question
maybe let (ac, p) = &mut counter.0; look better
@Stargateur I had that at first, actually. Matter of taste, I reckon
ofc you have to change p to *p then
17:23
The main implicit thing going on is that peek_mut lets you mutate the root of the heap, but when counter is dropped, sifts the new value down if it no longer belongs at the root

« first day (1803 days earlier)      last day (1906 days later) »