Browse Source

update shopping mall rust

pull/1064/head
davidrobert99 3 years ago
parent
commit
927f58c473
  1. 4
      subjects/shopping_mall/README.md

4
subjects/shopping_mall/README.md

@ -41,12 +41,12 @@ impl Mall {
} }
#[allow(dead_code)] #[allow(dead_code)]
pub fn hire_guards(&mut self, guard: guard::Guard) { pub fn hire_guard(&mut self, guard: guard::Guard) {
self.guards.push(guard); self.guards.push(guard);
} }
#[allow(dead_code)] #[allow(dead_code)]
pub fn fire_guards(&mut self, name: String) { pub fn fire_guard(&mut self, name: String) {
self.guards.retain(|x| x.name != name); self.guards.retain(|x| x.name != name);
} }
} }

Loading…
Cancel
Save