From 356c17d98b6ef899b2368a8807eeee258f81a27d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 20 Feb 2017 15:18:08 +0100 Subject: [PATCH] Add documentation for FileLockEntry --- libimagstore/src/store.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 455b3a95..8472ad91 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -929,6 +929,10 @@ pub struct FileLockEntry<'a> { } impl<'a> FileLockEntry<'a, > { + + /// Create a new FileLockEntry based on a `Entry` object. + /// + /// Only for internal use. fn new(store: &'a Store, entry: Entry) -> FileLockEntry<'a> { FileLockEntry { store: store, @@ -960,7 +964,11 @@ impl<'a> DerefMut for FileLockEntry<'a> { #[cfg(not(test))] impl<'a> Drop for FileLockEntry<'a> { + /// This will silently ignore errors, use `Store::update` if you want to catch the errors + /// + /// This might panic if the store was compiled with the early-panic feature (which is not + /// intended for production use, though). fn drop(&mut self) { use libimagerror::trace::trace_error_dbg;