« first day (830 days earlier)      last day (2641 days later) » 

4:53 AM
 
hah!
great idea @Shepmaster!
I ... had a bit of a brain fart on that part.
the other part I didn't consider odd - but taking a step back you're quite right.
 
Watch @ker just implement it in the next 24h. They are crazy like that
@SimonWhitehead you don't even have the excuse of it almost being midnight
Which is the reason that I'm going to bed
ttfn
 
haha - well, its a lazy Saturday with the kids watching a movie - so I figured I'd open my laptop and have a look at SO / try some more Rust.
no worries! ciao!
your solution on that question is quite nice @Shepmaster
 
@SimonWhitehead Thank you.
 
 
8 hours later…
12:43 PM
Is there something in Option with the same semantics as or except you pass in value instead of Some(value)?
 
@набиячлэвэли unwrap_or()?
 
@LukasKalbertodt No because I want an Option out of it
 
But... an_option.or(Some(value)) will always be Some(...), right? I don't think that such a method would exist.. :/
 
So the impl is like
impl<T> Option<T> {
    pub fn or_value(self, new: T) -> Option<T> {
        match self {
            Some(v) => Some(v),
            None => Some(new),
        }
    }
}
@LukasKalbertodt To preserve the contained value
rn I do r.or(Some(pr)) which is equiv. to Some(r.unwrap_or(pr))
but clippy complains about the first one and the second is meh
 
1:04 PM
@набиячлэвэли Doesn't clippy suggest how to improve it?
 
@LukasKalbertodt Stupidly, yes
It misdiagnoses
 
1:23 PM
@набиячлэвэли Oh yes, that is unfortunate. Too many false positives :(
 
 
1 hour later…
2:40 PM
Some(r.unwrap_or(pr)) is what I thought of first
 
 
6 hours later…
8:52 PM
Now, what does it mean for an RFC/feature to be in its final commitment period?
 
@E_net4 commitment or comment?
 

« first day (830 days earlier)      last day (2641 days later) »