Comment

Comment by iudqnolq

This is a general principal in the Rust standard library, but it is confusing at first. Similarly you can construct a HashMap without restriction but calling `.get` on it requires the key to implement Hash.

I'll let someone else clarify the reasoning because I'm not confident I remember it correctly. I though this was in the Rust API guidelines but I can't find it after a quick skin.

parent iudqnolq 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton