From c4bdec6082bc4a3f9f01a2a85405d43d160b0052 Mon Sep 17 00:00:00 2001 From: zhuxiujia Date: Sat, 13 Aug 2022 20:24:55 +0800 Subject: [PATCH] fix fastdate --- Cargo.toml | 2 +- src/plugin/file_split.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 14f62d1..3bf2139 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ [package] name = "fast_log" -version = "1.5.24" +version = "1.5.25" description = "Rust async log High-performance asynchronous logging" readme = "Readme.md" authors = ["ce "] diff --git a/src/plugin/file_split.rs b/src/plugin/file_split.rs index 2515835..d10c07a 100644 --- a/src/plugin/file_split.rs +++ b/src/plugin/file_split.rs @@ -93,7 +93,7 @@ impl RollingType { let file_name = item.file_name(); let name = file_name.to_str().unwrap_or("").to_string(); if let Some(time) = self.file_name_parse_time(&name, temp_name) { - if now.sub(duration.clone()) > time { + if now.clone().sub(duration.clone()) > time { std::fs::remove_file(item.path()); } }