Add wrapper for Link::to_str() -> StoreId::to_str()
This commit is contained in:
parent
c550325711
commit
6b821f7b28
1 changed files with 9 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue