5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-02-26 21:57:33 +03:00

update to nom 7

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-08-19 13:49:09 +02:00
parent 2a23675db3
commit 6512017f8b
5 changed files with 6 additions and 6 deletions

View File

@ -84,7 +84,7 @@ url = "2.1"
#valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true } #valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true }
walkdir = "2" walkdir = "2"
xdg = "2.2" xdg = "2.2"
nom = "5.1" nom = "7"
crossbeam-channel = "0.5" crossbeam-channel = "0.5"
# Used only by examples currently: # Used only by examples currently:

2
debian/control vendored
View File

@ -32,7 +32,7 @@ Build-Depends: debhelper (>= 12),
librust-libc-0.2+default-dev, librust-libc-0.2+default-dev,
librust-log-0.4+default-dev (>= 0.4.17-~~), librust-log-0.4+default-dev (>= 0.4.17-~~),
librust-nix-0.24+default-dev, librust-nix-0.24+default-dev,
librust-nom-5+default-dev (>= 5.1-~~), librust-nom-7+default-dev,
librust-num-traits-0.2+default-dev, librust-num-traits-0.2+default-dev,
librust-once-cell-1+default-dev (>= 1.3.1-~~), librust-once-cell-1+default-dev (>= 1.3.1-~~),
librust-openssl-0.10+default-dev (>= 0.10.38-~~), librust-openssl-0.10+default-dev (>= 0.10.38-~~),

View File

@ -20,7 +20,7 @@ lazy_static = "1.4"
libc = "0.2" libc = "0.2"
log = "0.4.17" log = "0.4.17"
nix = "0.24" nix = "0.24"
nom = "5.1" nom = "7"
openssl = "0.10" openssl = "0.10"
percent-encoding = "2.1" percent-encoding = "2.1"
regex = "1.5" regex = "1.5"

View File

@ -4,7 +4,7 @@ use nom::{
bytes::complete::{take_while, take_while1}, bytes::complete::{take_while, take_while1},
character::complete::digit1, character::complete::digit1,
combinator::{all_consuming, map_res, recognize}, combinator::{all_consuming, map_res, recognize},
error::{ParseError, VerboseError}, error::{ContextError, VerboseError},
}; };
pub type IResult<I, O, E = VerboseError<I>> = Result<(I, O), nom::Err<E>>; pub type IResult<I, O, E = VerboseError<I>> = Result<(I, O), nom::Err<E>>;
@ -44,7 +44,7 @@ pub fn parse_u64(i: &str) -> IResult<&str, u64> {
/// Parse complete input, generate verbose error message with line numbers /// Parse complete input, generate verbose error message with line numbers
pub fn parse_complete<'a, F, O>(what: &str, i: &'a str, parser: F) -> Result<O, Error> pub fn parse_complete<'a, F, O>(what: &str, i: &'a str, parser: F) -> Result<O, Error>
where where
F: Fn(&'a str) -> IResult<&'a str, O>, F: FnMut(&'a str) -> IResult<&'a str, O>,
{ {
match all_consuming(parser)(i) { match all_consuming(parser)(i) {
Err(nom::Err::Error(err)) | Err(nom::Err::Failure(err)) => { Err(nom::Err::Error(err)) | Err(nom::Err::Failure(err)) => {

View File

@ -157,7 +157,7 @@ fn parse_zpool_status_field(i: &str) -> IResult<&str, (String, String)> {
let indent: usize = prefix_len + 2; let indent: usize = prefix_len + 2;
let parse_continuation = opt(space_indented_line(indent)); let mut parse_continuation = opt(space_indented_line(indent));
let mut value = value.to_string(); let mut value = value.to_string();