Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Announcing Rust 1.22. Parent comment
But it's not a ternary operator, it's unary.
let val = foo.bar()?; will call `bar()`, return if it is None, and if it is `Some(foo)`, set `val` to `foo`.
There are no comments on this comment yet.
But it's not a ternary operator, it's unary.
let val = foo.bar()?; will call `bar()`, return if it is None, and if it is `Some(foo)`, set `val` to `foo`.