From 2a2bc793356dff37fcf9463029bbe7e0d508a5ed Mon Sep 17 00:00:00 2001 From: dnaq Date: Sun, 28 Jul 2024 19:30:07 +0200 Subject: [PATCH] Remove unnecessary `.as_mut()` call and fix log messages (#11358) These are changes that fell out of commit: d7a3cdea65ef321d53b8dc8417175781b5272049 --- helix-view/src/document.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index d470826e7..088a88dd3 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1080,20 +1080,20 @@ pub fn detect_indent_and_line_ending(&mut self) { } pub fn pickup_last_saved_time(&mut self) { - self.last_saved_time = match self.path().as_mut() { + self.last_saved_time = match self.path() { Some(path) => match path.metadata() { Ok(metadata) => match metadata.modified() { Ok(mtime) => mtime, - Err(_) => { + Err(e) => { log::error!( - "Use a system time instead of fs' mtime not supported on this platform" + "Using system time instead of fs' mtime: not supported on this platform: {e}" ); SystemTime::now() } }, Err(e) => { log::error!( - "Use a system time instead of fs' mtime: failed to file's metadata: {e}" + "Using system time instead of fs' mtime: failed to read file's metadata: {e}" ); SystemTime::now() }