summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-05-30 10:30:24 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-05-31 12:48:00 +0200
commit8a5bc09b62ed7a91e5a60e12fa68cba92395d2c8 (patch)
tree03bd0b474ed6f2e0c015e7c538d5c5ccb0961fc3
parentc33c29e8e25812c77010dd140c49b3d48aa675af (diff)
Fix libimagbookmark for new url library
-rw-r--r--lib/domain/libimagbookmark/Cargo.toml1
-rw-r--r--lib/domain/libimagbookmark/src/collection.rs12
-rw-r--r--lib/domain/libimagbookmark/src/lib.rs1
3 files changed, 8 insertions, 6 deletions
diff --git a/lib/domain/libimagbookmark/Cargo.toml b/lib/domain/libimagbookmark/Cargo.toml
index cd2aaa9..f351fa5 100644
--- a/lib/domain/libimagbookmark/Cargo.toml
+++ b/lib/domain/libimagbookmark/Cargo.toml
@@ -27,4 +27,5 @@ failure = "0.1"
libimagstore = { version = "0.10.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.10.0", path = "../../../lib/core/libimagerror" }
libimagentrylink = { version = "0.10.0", path = "../../../lib/entry/libimagentrylink" }
+libimagentryurl = { version = "0.10.0", path = "../../../lib/entry/libimagentryurl" }
diff --git a/lib/domain/libimagbookmark/src/collection.rs b/lib/domain/libimagbookmark/src/collection.rs
index 6589048..6647a26 100644
--- a/lib/domain/libimagbookmark/src/collection.rs
+++ b/lib/domain/libimagbookmark/src/collection.rs
@@ -35,7 +35,7 @@ use libimagstore::store::Entry;
use libimagstore::store::FileLockEntry;
use libimagstore::storeid::StoreId;
use libimagentryurl::linker::UrlLinker;
-use libimagentrylink::external::iter::UrlIter;
+use libimagentryurl::iter::UrlIter;
use libimagentrylink::internal::InternalLinker;
use libimagentrylink::internal::Link as StoreLink;
@@ -80,7 +80,7 @@ impl<'a> BookmarkCollectionStore<'a> for Store {
}
-pub trait BookmarkCollection : Sized + InternalLinker + ExternalLinker {
+pub trait BookmarkCollection : Sized + InternalLinker + UrlLinker {
fn links<'a>(&self, store: &'a Store) -> Result<UrlIter<'a>>;
fn link_entries(&self) -> Result<Vec<StoreLink>>;
fn add_link(&mut self, store: &Store, l: Link) -> Result<Vec<StoreId>>;
@@ -95,7 +95,7 @@ impl BookmarkCollection for Entry {
}
fn link_entries(&self) -> Result<Vec<StoreLink>> {
- use libimagentrylink::external::is_external_link_storeid;
+ use libimagentryurl::util::is_external_link_storeid;
self.get_internal_links().map(|v| v.filter(|id| is_external_link_storeid(id)).collect())
}
@@ -120,6 +120,9 @@ pub mod iter {
use crate::link::Link;
use failure::Fallible as Result;
use failure::Error;
+ use regex::Regex;
+
+ use libimagentryurl::iter::UrlIter;
pub struct LinkIter<I>(I)
where I: Iterator<Item = Link>;
@@ -144,9 +147,6 @@ pub mod iter {
}
}
- use libimagentrylink::external::iter::UrlIter;
- use regex::Regex;
-
pub struct LinksMatchingRegexIter<'a>(UrlIter<'a>, Regex);
impl<'a> LinksMatchingRegexIter<'a> {
diff --git a/lib/domain/libimagbookmark/src/lib.rs b/lib/domain/libimagbookmark/src/lib.rs
index 6072070..c8b2c59 100644
--- a/lib/domain/libimagbookmark/src/lib.rs
+++ b/lib/domain/libimagbookmark/src/lib.rs
@@ -44,6 +44,7 @@ extern crate regex;
#[macro_use] extern crate libimagstore;
extern crate libimagerror;
extern crate libimagentrylink;
+extern crate libimagentryurl;
module_entry_path_mod!("bookmark");