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:
commit
fef8ba57d7
1 changed files with 4 additions and 5 deletions
|
@ -6,17 +6,16 @@ use std::fs::metadata;
|
||||||
fn file_last_modified_time(ucmd: &UCommand, path: &str) -> String {
|
fn file_last_modified_time(ucmd: &UCommand, path: &str) -> String {
|
||||||
let tmp_dir_path = ucmd.get_full_fixture_path(path);
|
let tmp_dir_path = ucmd.get_full_fixture_path(path);
|
||||||
let file_metadata = metadata(tmp_dir_path);
|
let file_metadata = metadata(tmp_dir_path);
|
||||||
return file_metadata
|
file_metadata
|
||||||
.map(|i| {
|
.map(|i| {
|
||||||
return i
|
i.modified()
|
||||||
.modified()
|
|
||||||
.map(|x| {
|
.map(|x| {
|
||||||
let datetime: DateTime<Local> = x.into();
|
let datetime: DateTime<Local> = x.into();
|
||||||
datetime.format("%b %d %H:%M %Y").to_string()
|
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 {
|
fn now_time() -> String {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue