From b4ecb3f858250840b1bcd626fd952e92dabfb61d Mon Sep 17 00:00:00 2001 From: keyvan Date: Thu, 11 Apr 2024 07:20:54 -0700 Subject: [PATCH] fix: format --- src/agent/market_schedule.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/agent/market_schedule.rs b/src/agent/market_schedule.rs index b4dfc79..c51678a 100644 --- a/src/agent/market_schedule.rs +++ b/src/agent/market_schedule.rs @@ -159,9 +159,9 @@ fn time_range_parser<'s>(input: &mut &'s str) -> PResult { let (start_str, end_str) = separated_pair(take(4usize), "-", take(4usize)).parse_next(input)?; let start_time = NaiveTime::parse_from_str(start_str, "%H%M") - .map_err(|e| ErrMode::from_error_kind(input, ErrorKind::Verify))?; + .map_err(|_| ErrMode::from_error_kind(input, ErrorKind::Verify))?; let end_time = NaiveTime::parse_from_str(end_str, "%H%M") - .map_err(|e| ErrMode::from_error_kind(input, ErrorKind::Verify))?; + .map_err(|_| ErrMode::from_error_kind(input, ErrorKind::Verify))?; Ok(ScheduleDayKind::TimeRange(start_time, end_time)) } @@ -348,7 +348,6 @@ mod tests { // Date match after range assert!(!market_schedule .can_publish_at(&NaiveDateTime::parse_from_str("2023-04-22 17:01", format)?.and_utc())); - Ok(()) } }