Skip to content

Commit 2a2bc79

Browse files
authored
Remove unnecessary .as_mut() call and fix log messages (#11358)
These are changes that fell out of commit: d7a3cde
1 parent 2943911 commit 2a2bc79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

helix-view/src/document.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,20 +1080,20 @@ impl Document {
10801080
}
10811081

10821082
pub fn pickup_last_saved_time(&mut self) {
1083-
self.last_saved_time = match self.path().as_mut() {
1083+
self.last_saved_time = match self.path() {
10841084
Some(path) => match path.metadata() {
10851085
Ok(metadata) => match metadata.modified() {
10861086
Ok(mtime) => mtime,
1087-
Err(_) => {
1087+
Err(e) => {
10881088
log::error!(
1089-
"Use a system time instead of fs' mtime not supported on this platform"
1089+
"Using system time instead of fs' mtime: not supported on this platform: {e}"
10901090
);
10911091
SystemTime::now()
10921092
}
10931093
},
10941094
Err(e) => {
10951095
log::error!(
1096-
"Use a system time instead of fs' mtime: failed to file's metadata: {e}"
1096+
"Using system time instead of fs' mtime: failed to read file's metadata: {e}"
10971097
);
10981098
SystemTime::now()
10991099
}

0 commit comments

Comments
 (0)