3 ms·
Now that GP said it, it'd be nice to be able to write "some_map[i].value_or(some_value)".
by blegr 2y ago
Now that GP said it, it'd be nice to be able to write "some_map[i].value_or(some_value)".
- School-Cotton 2y agoYou can do this in rust with Vec::get, which returns an Option<&T>.