Add debug output for LazyFile::{get_file_mut,create_file}()
This commit is contained in:
parent
2c398d941b
commit
4bc905c692
1 changed files with 2 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue