From 7b7185f91673a2c649bbc61cba34d0e4e47d331b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 31 May 2021 21:20:55 +0200 Subject: [PATCH] Fix clippy warnings in the pr tests --- tests/by-util/test_pr.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/by-util/test_pr.rs b/tests/by-util/test_pr.rs index aae0cc058..584b15108 100644 --- a/tests/by-util/test_pr.rs +++ b/tests/by-util/test_pr.rs @@ -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 = 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 {