Add Link::exists() -> StoreId::exists() wrapper

This commit is contained in:
Matthias Beyer 2017-02-23 14:40:33 +01:00
parent 633f999d54
commit c550325711

View file

@ -44,6 +44,13 @@ pub enum Link {
impl Link {
pub fn exists(&self) -> bool {
match *self {
Link::Id { ref link } => link.exists(),
Link::Annotated { ref link, .. } => link.exists(),
}
}
fn eq_store_id(&self, id: &StoreId) -> bool {
match self {
&Link::Id { link: ref s } => s.eq(id),