Add Link::get_store_id() helper function
This commit is contained in:
parent
6b821f7b28
commit
f225aec9da
1 changed files with 8 additions and 0 deletions
|
@ -67,6 +67,14 @@ impl Link {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the StoreId inside the Link, which is always present
|
||||||
|
pub fn get_store_id(&self) -> &StoreId {
|
||||||
|
match self {
|
||||||
|
&Link::Id { link: ref s } => s,
|
||||||
|
&Link::Annotated { link: ref s, .. } => s,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Helper wrapper around Link for StoreId
|
/// Helper wrapper around Link for StoreId
|
||||||
fn without_base(self) -> Link {
|
fn without_base(self) -> Link {
|
||||||
match self {
|
match self {
|
||||||
|
|
Loading…
Reference in a new issue