1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #2321 from sylvestre/pr-test

Fix clippy warnings in the pr tests
This commit is contained in:
Sylvestre Ledru 2021-05-31 22:42:33 +02:00 committed by GitHub
commit fef8ba57d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,17 +6,16 @@ use std::fs::metadata;
fn file_last_modified_time(ucmd: &UCommand, path: &str) -> String {
let tmp_dir_path = ucmd.get_full_fixture_path(path);
let file_metadata = metadata(tmp_dir_path);
return file_metadata
file_metadata
.map(|i| {
return i
.modified()
i.modified()
.map(|x| {
let datetime: DateTime<Local> = x.into();
datetime.format("%b %d %H:%M %Y").to_string()
})
.unwrap_or(String::new());
.unwrap_or_default()
})
.unwrap_or(String::new());
.unwrap_or_default()
}
fn now_time() -> String {