summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-04-22 12:50:49 +0200
committerGitHub <noreply@github.com>2017-04-22 12:50:49 +0200
commit25a35183dd29051a159475f4a18d10de5051387c (patch)
tree24683024aed537e4909528c760fe5e3c4fcbfbf7
parent03f17b8a1c71efc385b645c0db74a5e2f6b9dfd9 (diff)
parent365f9eb237ba1a2e115aacef7e01aabe598c067d (diff)
downloadimag-25a35183dd29051a159475f4a18d10de5051387c.zip
imag-25a35183dd29051a159475f4a18d10de5051387c.tar.gz
Merge pull request #921 from matthiasbeyer/libimagentrylink/fix-exists
Fix: Link::exists() must return Result<bool> now
-rw-r--r--libimagentrylink/src/internal.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/libimagentrylink/src/internal.rs b/libimagentrylink/src/internal.rs
index 1c17026..5949495 100644
--- a/libimagentrylink/src/internal.rs
+++ b/libimagentrylink/src/internal.rs
@@ -44,11 +44,12 @@ pub enum Link {
impl Link {
- pub fn exists(&self) -> bool {
+ pub fn exists(&self) -> Result<bool> {
match *self {
Link::Id { ref link } => link.exists(),
Link::Annotated { ref link, .. } => link.exists(),
}
+ .map_err_into(LEK::StoreIdError)
}
pub fn to_str(&self) -> Result<String> {