• 0 Posts
  • 23 Comments
Joined 11 months ago
cake
Cake day: August 16th, 2023

help-circle









  • Other languages: if a is null return b.

    Rust: here is an array of strings, we are going to parse the array to numbers. If that conversion fails we handle the exception and return the minimum integer value. We then save the result in a new vector. We also print it.

    I like rust, but I hate the example too. It’s needlessly complex. Should have just been a.unwrap_or(b).