From e315fa9dcf886b0d9377268de8a38f817ee500cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 7 Feb 2016 00:58:53 +0100 Subject: [PATCH] Remove unwrap in drop and warn users --- libimagstore/src/store.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index e108c52f..f87bcfc5 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -267,8 +267,9 @@ impl<'a> ::std::ops::DerefMut for FileLockEntry<'a> { } impl<'a> Drop for FileLockEntry<'a> { + /// This will silently ignore errors, use `Store::update` if you want to catch the errors fn drop(&mut self) { - self.store._update(self).unwrap() + let _ = self.store._update(self); } }