use and Paths
Import items.
Bringing Items Into Scope
Typing full paths like std::collections::HashMap everywhere is tedious. The use keyword brings an item into scope so you can refer to it by a short name.
A Basic use
After a use, you reference the item by its final name. Here we import HashMap and use it directly.
use std::collections::HashMap;
fn main() {
let mut scores = HashMap::new();
scores.insert("ana", 10);
println!("{:?}", scores.get("ana"));
}