From f119595128117f530469acb9abc97b4f4d69918b Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Mon, 15 Jun 2020 12:30:44 +0200 Subject: [PATCH] fix clippy --- src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5bb7343e..c4467194 100644 --- a/src/main.rs +++ b/src/main.rs @@ -208,12 +208,9 @@ fn start_terminal( fn migrate_config() -> Result<()> { let cache_path: PathBuf = get_app_cache_path()?; - let entries = cache_path - .read_dir()? - .flat_map(|dir_entry| dir_entry) - .filter(|entry| { - !entry.file_name().to_string_lossy().ends_with(".log") - }); + let entries = cache_path.read_dir()?.flatten().filter(|entry| { + !entry.file_name().to_string_lossy().ends_with(".log") + }); let config_path: PathBuf = get_app_config_path()?; for entry in entries {