Comment

Comment by glandium

  let x = match x {
      Some(x) => x,
      None => return None,
  }
This implies your function returns an `Option`, and that `x` is an `Option` too. In which case you can just do

  let x = x?;
parent glandium 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton