Comment

Comment by khold_stare

Isn't that the opposite of the intended implementation? I don't write Rust, but I think your implementation will always return either `None` or the "fallback" value with the `"-default"` key. In the article, the crucial part is that if the first `map.get_mut()` succeeds, that is what is returned.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton