Skip to content

Commit

Permalink
build(deps): bump winnow to 0.7 (#898)
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Wagner <[email protected]>
  • Loading branch information
nwagner84 authored Feb 5, 2025
1 parent 43bce4b commit 15709ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sha2 = { version = "0.10" }
smallvec = { version = "1.13" }
strsim = { version = "0.11" }
thiserror = { version = "2.0" }
winnow = { version = "0.6" }
winnow = { version = "0.7" }

[dev-dependencies]
anyhow = { version = "1.0" }
Expand Down
10 changes: 7 additions & 3 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use winnow::ascii::{multispace0, multispace1};
use winnow::combinator::{
alt, delimited, preceded, repeat, separated_pair,
};
use winnow::error::{ContextError, ParserError};
use winnow::error::{ContextError, ErrMode, ParserError};
use winnow::prelude::*;
use winnow::stream::{AsChar, Compare, Stream, StreamIsPartial};
use winnow::token::take_till;
Expand Down Expand Up @@ -212,12 +212,16 @@ where

#[inline]
fn parse_string_single_quoted(i: &mut &[u8]) -> ModalResult<Vec<u8>> {
parse_quoted_string::<ContextError>(Quotes::Single).parse_next(i)
parse_quoted_string::<ContextError>(Quotes::Single)
.parse_next(i)
.map_err(ErrMode::Backtrack)
}

#[inline]
fn parse_string_double_quoted(i: &mut &[u8]) -> ModalResult<Vec<u8>> {
parse_quoted_string::<ContextError>(Quotes::Double).parse_next(i)
parse_quoted_string::<ContextError>(Quotes::Double)
.parse_next(i)
.map_err(ErrMode::Backtrack)
}

pub(crate) fn parse_string(i: &mut &[u8]) -> ModalResult<Vec<u8>> {
Expand Down

0 comments on commit 15709ff

Please sign in to comment.