mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 03:13:23 +00:00
Fix a needless borrow in OSDK
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
eaf51ccb24
commit
a089fbd4fc
@ -276,7 +276,7 @@ fn get_last_modified_time(path: impl AsRef<Path>) -> SystemTime {
|
|||||||
|
|
||||||
let metadata = entry.metadata().unwrap();
|
let metadata = entry.metadata().unwrap();
|
||||||
if metadata.is_dir() {
|
if metadata.is_dir() {
|
||||||
last_modified = std::cmp::max(last_modified, get_last_modified_time(&entry.path()));
|
last_modified = std::cmp::max(last_modified, get_last_modified_time(entry.path()));
|
||||||
} else {
|
} else {
|
||||||
last_modified = std::cmp::max(last_modified, metadata.modified().unwrap());
|
last_modified = std::cmp::max(last_modified, metadata.modified().unwrap());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user