Skip to content

Commit 00412f1

Browse files
authored
Merge pull request #638 from epage/w7
chore: Upgrade to Winnow 0.7
2 parents b57cf19 + 2bb4a35 commit 00412f1

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

Cargo.lock

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ json5_rs = { version = "0.4", optional = true, package = "json5" }
134134
indexmap = { version = "2.2", features = ["serde"], optional = true }
135135
convert_case = { version = "0.6", optional = true }
136136
pathdiff = "0.2"
137-
winnow = "0.6.20"
137+
winnow = "0.7.0"
138138

139139
[dev-dependencies]
140140
serde_derive = "1.0"

src/path/parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ pub(crate) fn from_str(input: &str) -> Result<Expression, ParseError<&str, Conte
2323
path.parse(input)
2424
}
2525

26-
fn path(i: &mut &str) -> PResult<Expression> {
26+
fn path(i: &mut &str) -> ModalResult<Expression> {
2727
let root = ident.parse_next(i)?;
2828
let postfix = repeat(0.., postfix).parse_next(i)?;
2929
let expr = Expression { root, postfix };
3030
Ok(expr)
3131
}
3232

33-
fn postfix(i: &mut &str) -> PResult<Postfix> {
33+
fn postfix(i: &mut &str) -> ModalResult<Postfix> {
3434
dispatch! {any;
3535
'[' => cut_err(
3636
seq!(
@@ -51,7 +51,7 @@ fn postfix(i: &mut &str) -> PResult<Postfix> {
5151
.parse_next(i)
5252
}
5353

54-
fn ident(i: &mut &str) -> PResult<String> {
54+
fn ident(i: &mut &str) -> ModalResult<String> {
5555
take_while(1.., ('a'..='z', 'A'..='Z', '0'..='9', '_', '-'))
5656
.map(ToOwned::to_owned)
5757
.context(StrContext::Label("identifier"))
@@ -63,7 +63,7 @@ fn ident(i: &mut &str) -> PResult<String> {
6363
.parse_next(i)
6464
}
6565

66-
fn integer(i: &mut &str) -> PResult<isize> {
66+
fn integer(i: &mut &str) -> ModalResult<isize> {
6767
seq!(
6868
_: space0,
6969
(opt('-'), digit1).take().try_map(FromStr::from_str),

0 commit comments

Comments
 (0)