diff --git a/proxmox-time/Cargo.toml b/proxmox-time/Cargo.toml index 535f78cf..04b916c6 100644 --- a/proxmox-time/Cargo.toml +++ b/proxmox-time/Cargo.toml @@ -12,7 +12,7 @@ exclude = [ "debian" ] anyhow = "1.0" bitflags = "1.2.1" lazy_static = "1.4" -nom = "5.1" +nom = "7" [target.'cfg(not(target_arch="wasm32"))'.dependencies] libc = { version = "0.2", features = [ "extra_traits" ] } diff --git a/proxmox-time/debian/control b/proxmox-time/debian/control index d136ce78..7d3426cb 100644 --- a/proxmox-time/debian/control +++ b/proxmox-time/debian/control @@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 12), librust-lazy-static-1+default-dev (>= 1.4-~~) , librust-libc-0.2+default-dev , librust-libc-0.2+extra-traits-dev , - librust-nom-5+default-dev (>= 5.1-~~) + librust-nom-7+default-dev Maintainer: Proxmox Support Team Standards-Version: 4.5.1 Vcs-Git: git://git.proxmox.com/git/proxmox.git @@ -30,15 +30,15 @@ Depends: librust-lazy-static-1+default-dev (>= 1.4-~~), librust-libc-0.2+default-dev, librust-libc-0.2+extra-traits-dev, - librust-nom-5+default-dev (>= 5.1-~~) + librust-nom-7+default-dev Provides: librust-proxmox-time+default-dev (= ${binary:Version}), librust-proxmox-time-1-dev (= ${binary:Version}), librust-proxmox-time-1+default-dev (= ${binary:Version}), librust-proxmox-time-1.1-dev (= ${binary:Version}), librust-proxmox-time-1.1+default-dev (= ${binary:Version}), - librust-proxmox-time-1.1.2-dev (= ${binary:Version}), - librust-proxmox-time-1.1.2+default-dev (= ${binary:Version}) + librust-proxmox-time-1.1.3-dev (= ${binary:Version}), + librust-proxmox-time-1.1.3+default-dev (= ${binary:Version}) Description: Time utilities and TmEditor - Rust source code This package contains the source for the Rust proxmox-time crate, packaged by debcargo for use with cargo and dh-cargo. diff --git a/proxmox-time/src/calendar_event.rs b/proxmox-time/src/calendar_event.rs index 59f61a7f..76883137 100644 --- a/proxmox-time/src/calendar_event.rs +++ b/proxmox-time/src/calendar_event.rs @@ -6,7 +6,7 @@ use nom::{ character::complete::space0, combinator::opt, error::context, - multi::separated_nonempty_list, + multi::separated_list1, sequence::{preceded, terminated, tuple}, }; @@ -326,7 +326,7 @@ fn parse_calendar_event_incomplete(mut i: &str) -> IResult<&str, CalendarEvent> let (n, range_list) = context( "weekday range list", - separated_nonempty_list(tag(","), parse_weekdays_range), + separated_list1(tag(","), parse_weekdays_range), )(i)?; has_dayspec = true; @@ -416,7 +416,7 @@ fn parse_date_time_comp_list( return Ok((rest, Vec::new())); } - separated_nonempty_list(tag(","), parse_date_time_comp(max))(i) + separated_list1(tag(","), parse_date_time_comp(max))(i) } } diff --git a/proxmox-time/src/daily_duration.rs b/proxmox-time/src/daily_duration.rs index 078cf79c..92e64fe2 100644 --- a/proxmox-time/src/daily_duration.rs +++ b/proxmox-time/src/daily_duration.rs @@ -3,8 +3,7 @@ use std::convert::{TryFrom, TryInto}; use anyhow::Error; use nom::{ - bytes::complete::tag, character::complete::space0, error::context, - multi::separated_nonempty_list, + bytes::complete::tag, character::complete::space0, error::context, multi::separated_list1, }; use crate::parse_helpers::{parse_complete_line, parse_error, parse_hm_time, IResult}; @@ -94,7 +93,7 @@ fn parse_daily_duration_incomplete(mut i: &str) -> IResult<&str, DailyDuration> if i.starts_with(|c: char| char::is_ascii_alphabetic(&c)) { let (n, range_list) = context( "weekday range list", - separated_nonempty_list(tag(","), parse_weekdays_range), + separated_list1(tag(","), parse_weekdays_range), )(i)?; i = space0(n)?.0; diff --git a/proxmox-time/src/parse_helpers.rs b/proxmox-time/src/parse_helpers.rs index 4890b2f2..94d077f9 100644 --- a/proxmox-time/src/parse_helpers.rs +++ b/proxmox-time/src/parse_helpers.rs @@ -6,7 +6,7 @@ use nom::{ bytes::complete::tag, character::complete::digit1, combinator::{all_consuming, map_res, opt, recognize}, - error::{ParseError, VerboseError}, + error::{ContextError, VerboseError}, sequence::{preceded, tuple}, };