lib: Add Links::{add,remove}()
This commit is contained in:
parent
6480fb515c
commit
339ec08a83
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,14 @@ impl Links {
|
|||
Links { links: s }
|
||||
}
|
||||
|
||||
pub fn add(&mut self, l: Link) {
|
||||
self.links.push(l);
|
||||
}
|
||||
|
||||
pub fn remove(&mut self, l: Link) {
|
||||
self.links.retain(|link| l != link.clone());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Into<String> for Link {
|
||||
|
|
Loading…
Reference in a new issue