3 ms·
Yes, or use the entry api: https://doc.rust-lang.org/beta/std/collections/hash_map/enum.Entry.html https://doc.rust-lang.org/beta/std/collections/hash_map/enum.
by css 2y ago
Yes, or use the entry api: https://doc.rust-lang.org/beta/std/collections/hash_map/enum.Entry.html https://doc.rust-lang.org/beta/std/collections/hash_map/enum...
- josephcsible 2y agoI see how that helps with the usual case of inserting a value under the original key if it wasn't there, but I don't see how it helps in this case of checking a different key entirely if it wasn't there.