summaryrefslogtreecommitdiffstats
path: root/vendor/toml_edit/src/parser/key.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/toml_edit/src/parser/key.rs
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/toml_edit/src/parser/key.rs')
-rw-r--r--vendor/toml_edit/src/parser/key.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/toml_edit/src/parser/key.rs b/vendor/toml_edit/src/parser/key.rs
index c3d4e7962..eda319307 100644
--- a/vendor/toml_edit/src/parser/key.rs
+++ b/vendor/toml_edit/src/parser/key.rs
@@ -1,9 +1,9 @@
use std::ops::RangeInclusive;
-use winnow::bytes::any;
-use winnow::bytes::take_while1;
use winnow::combinator::peek;
-use winnow::multi::separated1;
+use winnow::combinator::separated1;
+use winnow::token::any;
+use winnow::token::take_while;
use crate::key::Key;
use crate::parser::errors::CustomError;
@@ -29,7 +29,7 @@ pub(crate) fn key(input: Input<'_>) -> IResult<Input<'_>, Vec<Key>, ParserError<
DOT_SEP,
)
.context(Context::Expression("key"))
- .map_res(|k: Vec<_>| {
+ .try_map(|k: Vec<_>| {
// Inserting the key will require recursion down the line
RecursionCheck::check_depth(k.len())?;
Ok::<_, CustomError>(k)
@@ -58,7 +58,7 @@ pub(crate) fn simple_key(
// unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _
fn unquoted_key(input: Input<'_>) -> IResult<Input<'_>, &str, ParserError<'_>> {
- take_while1(UNQUOTED_CHAR)
+ take_while(1.., UNQUOTED_CHAR)
.map(|b| unsafe { from_utf8_unchecked(b, "`is_unquoted_char` filters out on-ASCII") })
.parse_next(input)
}