You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sfackler I realised this, thus the default would be set in std via that type alias, not in alloc. And why we need the trait to implement the new and with_capacity methods.
My position is that if you need a no_std hashmap, you can just use the hashbrown crate directly. Maybe we could make this official and add it to the documentation?
That is not a generally-acceptable solution due to interoperability concerns. Currently, if you get a Vec returned from a no_std library, you can pass this to function accepting a Vec in a std library. Whatever solution we come up with for HashMap should be the same.
Reacted by Lokathor, Restioson, grego, Nico Burns, Paho Lurie-Gregg, David Hoppenbrouwers, Anders Evensen, Johannes Dahlström, Arnau Orriols, Juhan Oskar Hennoste and 3 more
Activity
sfackler commentedon Nov 24, 2018
The default hasher requires access to the OS's random number generator which isn't available in liballoc.
WildCryptoFox commentedon Nov 24, 2018
@sfackler I realised this, thus the default would be set in std via that type alias, not in alloc. And why we need the trait to implement the new and with_capacity methods.
jethrogb commentedon Nov 26, 2018
This is rust-lang-nursery/portability-wg#11
steveklabnik commentedon Jan 22, 2020
Triage: not aware of any real movement here.
Amanieu commentedon Jan 22, 2020
My position is that if you need a no_std hashmap, you can just use the hashbrown crate directly. Maybe we could make this official and add it to the documentation?
jethrogb commentedon Jan 22, 2020
That is not a generally-acceptable solution due to interoperability concerns. Currently, if you get a
Vecreturned from ano_stdlibrary, you can pass this to function accepting aVecin astdlibrary. Whatever solution we come up with forHashMapshould be the same.jethrogb commentedon Apr 24, 2020
Dup of #27242?
dtolnay commentedon May 27, 2020
Closing in favor of #27242.