Change signature: Link::exists(&Store)

This change is necessary because we need the store now to check whether
a StoreId exists.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-12-15 01:32:07 +01:00
parent 429ef9bc4c
commit 14a2485a8a

View file

@ -45,10 +45,10 @@ pub enum Link {
impl Link { impl Link {
pub fn exists(&self) -> Result<bool> { pub fn exists(&self, store: &Store) -> Result<bool> {
match *self { match *self {
Link::Id { ref link } => link.exists(), Link::Id { ref link } => store.exists(link.clone()),
Link::Annotated { ref link, .. } => link.exists(), Link::Annotated { ref link, .. } => store.exists(link.clone()),
} }
.map_err(From::from) .map_err(From::from)
} }