History of Idiom 8 > diff from v43 to v44
Edit summary for version 44 by programming-idioms.org:
[Rust] Fix demo
[Rust] Fix demo
↷
Version 43
2018-12-17, 18:14:33
Version 44
2018-12-30, 11:40:42
Idiom #8 Initialize a new map (associative array)
Declare a new map object x, and provide some (key, value) pairs as initial content.
Idiom #8 Initialize a new map (associative array)
Declare a new map object x, and provide some (key, value) pairs as initial content.
Comments bubble
The function new of the type BTreeMap returns a usable map.
The map is stored mutable in the variable x.
Maps in Rust are generic but the type is determined by the compiler based on the later usage.
A line such as `x.insert(1, "one")` would therefore not compile.
Comments bubble
The function new of the type BTreeMap returns a usable map.
The map is stored mutable in the variable x.
Maps in Rust are generic but the type is determined by the compiler based on the later usage.
A line such as `x.insert(1, "one")` would therefore not compile.