debtmap 0.16.4

Code complexity and technical debt analyzer
Documentation
1
2
3
4
5
6
7
8
9
use std::collections::HashMap;

fn build_map_imperative(items: Vec<(String, i32)>) -> HashMap<String, i32> {
    let mut map = HashMap::new();
    for (k, v) in items {
        map.insert(k, v);
    }
    map
}