lib: Add Links::{add,remove}()

This commit is contained in:
Matthias Beyer 2016-02-15 13:18:46 +01:00
parent 6480fb515c
commit 339ec08a83

View file

@ -26,6 +26,14 @@ impl Links {
Links { links: s } 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 { impl Into<String> for Link {