From 4a347213c3f217892e0b689af88ee6bbe7969d5b Mon Sep 17 00:00:00 2001 From: zxj Date: Sat, 27 Jul 2024 01:45:04 +0800 Subject: [PATCH] add impl PackType --- src/plugin/file_split.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugin/file_split.rs b/src/plugin/file_split.rs index ce92cee..3e6e11e 100644 --- a/src/plugin/file_split.rs +++ b/src/plugin/file_split.rs @@ -179,21 +179,21 @@ pub enum PackType { impl CanPack for PackType { fn is(&mut self, temp_size: usize, arg: &FastLogRecord) -> bool { - match self { + return match self { PackType::ByDate(date_time) => { let dt = fastdate::DateTime::from_system_time(arg.now, fastdate::offset_sec()); if dt.day() > date_time.day() { *date_time = dt; - return true; + true } else { - return false; + false } } PackType::BySize(limit) => { if temp_size >= limit.get_len() { - return true; + true } else { - return false; + false } } }