From 4bc905c692915b5cbcd696e67041245a55ea5f27 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 28 Jan 2016 21:00:33 +0100 Subject: [PATCH] Add debug output for LazyFile::{get_file_mut,create_file}() --- libimagstore/src/lazyfile.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libimagstore/src/lazyfile.rs b/libimagstore/src/lazyfile.rs index 27259d6e..b613ad91 100644 --- a/libimagstore/src/lazyfile.rs +++ b/libimagstore/src/lazyfile.rs @@ -53,6 +53,7 @@ impl LazyFile { * Get the mutable file behind a LazyFile object */ pub fn get_file_mut(&mut self) -> Result<&mut File, StoreError> { + debug!("Getting lazy file: {:?}", self); let file = match *self { LazyFile::File(ref mut f) => return { // We seek to the beginning of the file since we expect each @@ -80,6 +81,7 @@ impl LazyFile { * Create a file out of this LazyFile object */ pub fn create_file(&mut self) -> Result<&mut File, StoreError> { + debug!("Creating lazy file: {:?}", self); let file = match *self { LazyFile::File(ref mut f) => return Ok(f), LazyFile::Absent(ref p) => {