diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2023-01-27 10:33:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 18:33:24 +0900 |
commit | 5e123fcbcea4f813808380bc285eee5c73b1c84b (patch) | |
tree | fdc17258c3dcf309c4929694475ff36043a05031 /src/logger.rs | |
parent | 21090b2e9455e0aa0bc45d43470283eac1565d5d (diff) |
chore: fix clippy warnings for rust 1.67 (#4855)
Diffstat (limited to 'src/logger.rs')
-rw-r--r-- | src/logger.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/logger.rs b/src/logger.rs index 7e86c10b6..9ab75cb11 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -35,10 +35,9 @@ pub fn get_log_dir() -> PathBuf { /// Deletes all log files in the log directory that were modified more than 24 hours ago. pub fn cleanup_log_files<P: AsRef<Path>>(path: P) { let log_dir = path.as_ref(); - let log_files = match fs::read_dir(log_dir) { - Ok(log_files) => log_files, + let Ok(log_files) = fs::read_dir(log_dir) else { // Avoid noisily handling errors in this cleanup function. - Err(_) => return, + return }; for file in log_files { |