Comment

Comment by the__alchemist

Something I use for situations where nesting is getting out of hand. Probably not idiomatic but, I find it practical in these cases.

  if param.is_none() {
    // Handle, and continue, return an error etc
  }
  let value = param.as_ref().unwrap(); // or as_mut
  // Use `value` as normal.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton