From 19f273db4533e8a1f148cc8d61e0f2db087427ad Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 14 Jun 2016 11:07:18 +0200 Subject: [PATCH] Impl Ref::is_dangling() --- libimagref/src/reference.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libimagref/src/reference.rs b/libimagref/src/reference.rs index 6b994441..1066e53c 100644 --- a/libimagref/src/reference.rs +++ b/libimagref/src/reference.rs @@ -54,6 +54,11 @@ impl<'a> Ref<'a> { unimplemented!() } + /// Alias for `!Ref::fs_link_exists()` + pub fn is_dangling(&self) -> bool { + !self.fs_link_exists() + } + /// check whether the pointer the Ref represents is valid /// This includes: /// - Hashsum of the file is still the same as stored in the Ref