Open apasel422 opened 9 years ago
Unfortunately, ToOwned::to_owned takes &self, which means that it will be strictly less efficient when passing keys by value. It appears that Into is a possibility, though.
ToOwned::to_owned
&self
Into
This needs to support the use case of efficient &str-based access to a map with owned String keys.
&str
String
I'm experimenting with this in https://github.com/apasel422/tree/tree/entry-into.
Unfortunately,
ToOwned::to_owned
takes&self
, which means that it will be strictly less efficient when passing keys by value. It appears thatInto
is a possibility, though.