Y
Hacker News
new
|
ask
|
show
|
jobs
by
blegr
771 days ago
Now that GP said it, it'd be nice to be able to write "some_map[i].value_or(some_value)".
1 comments
umanwizard
771 days ago
You can do this in rust with Vec::get, which returns an Option<&T>.
link