News for hackers. Stuff that matters.
Re:Thoughts on Rust, a few thousand lines in by Thiez on Thursday January 10, 2019 @06:44AM (#18873167)
Often such functions can be rewritten to perform some operations "inside" the option. For example:

    fn is_equal_to_ten(n: Option<u32>) -> bool {
        n.map(|n|n == 10).unwrap_or_default()
    }

There are no comments on this comment yet.