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

11:03 AM
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 PM
@LukasKalbertodt dude already had his answer - thanks for pointing out the crosspost
should probably voteclose
 
 
4 hours later…
4:49 PM
@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.
 
5:05 PM
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
 
5:23 PM
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 (1676 days later) »