From d24cc0c43ca9b51ae9f977b2587730cced8b2e02 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Sat, 22 Jan 2022 20:31:43 -0500 Subject: [PATCH] Clean up warnings --- src/parse.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/parse.rs b/src/parse.rs index f3a065a..ddb2592 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -2,14 +2,12 @@ use std::str::FromStr; use itertools::Itertools; use nom::{ - branch::{alt, Alt}, - bytes::complete::{tag, tag_no_case}, + branch::alt, character::complete::{char, digit1}, combinator::map_res, IResult, }; use thiserror::Error; -use unicase::UniCase; use crate::{CronEntry, CronSpecifier}; @@ -86,7 +84,7 @@ pub(crate) fn parse_entry(entry: &str) -> Result { let res: IResult<&str, CronEntry> = perform_entry_parse(entry); match res { Ok((remaining, result)) => { - ensure_all_data_parsed(remaining, &result)?; + ensure_all_data_parsed(remaining)?; ensure_ranges_valid(&result)?; Ok(result) @@ -98,7 +96,7 @@ pub(crate) fn parse_entry(entry: &str) -> Result { } } -fn ensure_all_data_parsed(remaining: &str, parsed_entry: &CronEntry) -> Result<(), Error> { +fn ensure_all_data_parsed(remaining: &str) -> Result<(), Error> { if remaining.is_empty() { Ok(()) } else {