Impl remove()
This commit is contained in:
parent
e773294b2c
commit
de4c700d6e
1 changed files with 10 additions and 1 deletions
|
@ -65,6 +65,15 @@ fn list(rt: &Runtime) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remove(rt: &Runtime) {
|
fn remove(rt: &Runtime) {
|
||||||
unimplemented!()
|
let scmd = rt.cli().subcommand_matches("remove").unwrap();
|
||||||
|
let coll = scmd.value_of("collection").unwrap(); // enforced by clap
|
||||||
|
|
||||||
|
BookmarkCollection::get(rt.store(), coll)
|
||||||
|
.map(|mut collection| {
|
||||||
|
for url in scmd.values_of("urls").unwrap() { // enforced by clap
|
||||||
|
collection.remove_link(BookmarkLink::from(url)).map_err(|e| trace_error(&e));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
info!("Ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue