|
|
@ -194,14 +194,8 @@ impl Storage { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn remove(&mut self, id: &String) { |
|
|
|
pub fn remove(&mut self, id: &String) { |
|
|
|
for it in self.items.iter() { |
|
|
|
|
|
|
|
println!("x: {}", it.id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let item = Item::from_empty(id.clone()); |
|
|
|
let item = Item::from_empty(id.clone()); |
|
|
|
self.items.remove(&item); |
|
|
|
self.items.remove(&item); |
|
|
|
for it in self.items.iter() { |
|
|
|
|
|
|
|
println!("y: {}", it.id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn dump(&self) -> io::Result<()> { |
|
|
|
pub fn dump(&self) -> io::Result<()> { |
|
|
|