Re:A Quick Comparison of Nim vs. Rust
by arthurtw on Wednesday January 14, 2015 @04:50AM
(#8885266)
Good point! I’ve updated the article accordingly. I learned the Entry thing a few months ago, but Rust’s BTreeMap did not support the entry API at that time, so my code did not use it. Then I totally forgot about it when writing this blog...
http://doc.rust-lang.org/std/collections/struct.BTreeMap.htm...
I think the example used in the docs is your exact use case.
This bit:
can be replaced with