Clean up warnings
parent
85f3c0800c
commit
d24cc0c43c
|
@ -2,14 +2,12 @@ use std::str::FromStr;
|
||||||
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use nom::{
|
use nom::{
|
||||||
branch::{alt, Alt},
|
branch::alt,
|
||||||
bytes::complete::{tag, tag_no_case},
|
|
||||||
character::complete::{char, digit1},
|
character::complete::{char, digit1},
|
||||||
combinator::map_res,
|
combinator::map_res,
|
||||||
IResult,
|
IResult,
|
||||||
};
|
};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use unicase::UniCase;
|
|
||||||
|
|
||||||
use crate::{CronEntry, CronSpecifier};
|
use crate::{CronEntry, CronSpecifier};
|
||||||
|
|
||||||
|
@ -86,7 +84,7 @@ pub(crate) fn parse_entry(entry: &str) -> Result<CronEntry, Error> {
|
||||||
let res: IResult<&str, CronEntry> = perform_entry_parse(entry);
|
let res: IResult<&str, CronEntry> = perform_entry_parse(entry);
|
||||||
match res {
|
match res {
|
||||||
Ok((remaining, result)) => {
|
Ok((remaining, result)) => {
|
||||||
ensure_all_data_parsed(remaining, &result)?;
|
ensure_all_data_parsed(remaining)?;
|
||||||
ensure_ranges_valid(&result)?;
|
ensure_ranges_valid(&result)?;
|
||||||
|
|
||||||
Ok(result)
|
Ok(result)
|
||||||
|
@ -98,7 +96,7 @@ pub(crate) fn parse_entry(entry: &str) -> Result<CronEntry, Error> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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() {
|
if remaining.is_empty() {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue