Add wrapper for Link::to_str() -> StoreId::to_str()

This commit is contained in:
Matthias Beyer 2017-02-23 15:25:32 +01:00
parent c550325711
commit 6b821f7b28

View file

@ -51,6 +51,15 @@ impl Link {
}
}
pub fn to_str(&self) -> Result<String> {
match *self {
Link::Id { ref link } => link.to_str(),
Link::Annotated { ref link, .. } => link.to_str(),
}
.map_err_into(LEK::StoreReadError)
}
fn eq_store_id(&self, id: &StoreId) -> bool {
match self {
&Link::Id { link: ref s } => s.eq(id),