Skip to content

Commit

Permalink
chore(deps): update to latest winnow version
Browse files Browse the repository at this point in the history
The latest version contains some deprecations of methods used. Changing
these early avoids the chance for many breaking changes later.
  • Loading branch information
dnaka91 committed Dec 5, 2023
1 parent f35a942 commit 02d1d40
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ all = "deny"
pedantic = "warn"

[workspace.dependencies]
clap = { version = "4.4.10", features = ["derive", "wrap_help"] }
clap = { version = "4.4.11", features = ["derive", "wrap_help"] }
color-eyre = { version = "0.6.2", default-features = false }
glob = "0.3.1"
indoc = "2.0.4"
Expand Down
2 changes: 1 addition & 1 deletion crates/stef-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rustc-args = ["--cfg", "docsrs"]
miette.workspace = true
owo-colors.workspace = true
stef-derive = { path = "../stef-derive" }
winnow = "0.5.19"
winnow = "0.5.24"

[dev-dependencies]
indoc.workspace = true
Expand Down
7 changes: 5 additions & 2 deletions crates/stef-parser/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ mod comments {
combinator::{preceded, repeat, terminated},
error::ErrorKind,
stream::Stream,
token::take_till0,
token::take_till,
Parser,
};

Expand Down Expand Up @@ -183,7 +183,10 @@ mod comments {

repeat(
0..,
preceded((space0, "///", space0), terminated(take_till0('\n'), '\n')),
preceded(
(space0, "///", space0),
terminated(take_till(0.., '\n'), '\n'),
),
)
.parse_next(input)
.map(Comment)
Expand Down
4 changes: 2 additions & 2 deletions crates/stef-parser/src/parser/literals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use winnow::{
dispatch,
error::ErrorKind,
stream::Location,
token::{any, one_of, take_till1, take_while},
token::{any, one_of, take_till, take_while},
Parser,
};

Expand Down Expand Up @@ -174,7 +174,7 @@ fn parse_fragment<'i>(input: &mut Input<'i>) -> Result<Fragment<'i>, Cause> {
}

fn parse_string_literal<'i>(input: &mut Input<'i>) -> Result<&'i str, Cause> {
take_till1(['"', '\\'])
take_till(1.., ['"', '\\'])
.verify(|s: &str| !s.is_empty())
.parse_next(input)
}
Expand Down

0 comments on commit 02d1d40

Please sign in to comment.