On Tue, Jul 2, 2013 at 9:26 AM, Abhijeet Gaiha <[email protected]> wrote:
> Hi Folks,
>
> Is there a way to statically initialise a LinearMap in code? Something like
> you can do with a vector.
> Any other suggestions to save time for inserting a fixed set of values into
> a hash map?
>

LinearMap is now std::hashmap::HashMap (in 0.7 and in master). There
is no way to have a *static* hashmap, I think (`static h: HashMap<K,
V> = HashMap::new()`, would be immutable and useless), but you could
write a macro that expands to a bunch of inserts into a hashmap. Not
sure, though.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to