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

Method new

705-design-hashset.rs:13–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11impl MyHashSet {
12
13 fn new() -> Self {
14 MyHashSet {set: HashSet::new()}
15 }
16
17 fn add(&mut self, key: i32) {
18 self.set.insert(key);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected