Can delete user account
This commit is contained in:
@ -92,7 +92,7 @@ impl<E> EntityManager<E>
|
||||
self.list.clone()
|
||||
}
|
||||
|
||||
pub fn update_or_replace(&mut self, entry: E) -> Res {
|
||||
pub fn update_or_push(&mut self, entry: E) -> Res {
|
||||
let mut found = false;
|
||||
for i in &mut self.list {
|
||||
if i == &entry {
|
||||
@ -108,4 +108,9 @@ impl<E> EntityManager<E>
|
||||
|
||||
self.save()
|
||||
}
|
||||
|
||||
pub fn remove(&mut self, entry: &E) -> Res {
|
||||
self.list.retain(|x| x != entry);
|
||||
self.save()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user