MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / new

Method new

677-map-sum-pairs.rs:14–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12impl MapSum {
13
14 fn new() -> Self {
15 MapSum {
16 mmp: HashMap::new()
17 }
18 }
19
20 fn insert(&mut self, key: String, val: i32) {
21 if let Some(x) = self.mmp.get_mut(&key) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected