MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / drop

Method drop

29_pattern_matching_revisited/rust/pattern/src/main.rs:62–69  ·  view source on GitHub ↗
(&mut self, obj: String, room: &mut Room)

Source from the content-addressed store, hash-verified

60 }
61
62 fn drop(&mut self, obj: String, room: &mut Room) {
63 if self.backpack.contains(&obj) {
64 self.backpack.remove(&obj);
65 room.objects.insert(obj);
66 } else {
67 println!("not in backpack {}", obj);
68 }
69 }
70}
71
72fn main() {

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected