diff options
Diffstat (limited to 'vendor/toml_edit/src/parser/key.rs')
-rw-r--r-- | vendor/toml_edit/src/parser/key.rs | 10 |
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) } |