diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/toml_edit/src/parser/table.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/toml_edit/src/parser/table.rs')
-rw-r--r-- | vendor/toml_edit/src/parser/table.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/vendor/toml_edit/src/parser/table.rs b/vendor/toml_edit/src/parser/table.rs index 1c76ed19b..a6085e475 100644 --- a/vendor/toml_edit/src/parser/table.rs +++ b/vendor/toml_edit/src/parser/table.rs @@ -2,10 +2,10 @@ use std::cell::RefCell; #[allow(unused_imports)] use std::ops::DerefMut; -use nom8::bytes::take; -use nom8::combinator::cut; -use nom8::combinator::peek; -use nom8::sequence::delimited; +use winnow::bytes::take; +use winnow::combinator::cut_err; +use winnow::combinator::peek; +use winnow::sequence::delimited; // https://github.com/rust-lang/rust/issues/41358 use crate::parser::key::key; @@ -32,18 +32,18 @@ pub(crate) fn std_table<'s, 'i>( ( delimited( STD_TABLE_OPEN, - cut(key), - cut(STD_TABLE_CLOSE) + cut_err(key), + cut_err(STD_TABLE_CLOSE) .context(Context::Expected(ParserValue::CharLiteral('.'))) .context(Context::Expected(ParserValue::StringLiteral("]"))), ) .with_span(), - cut(line_trailing) + cut_err(line_trailing) .context(Context::Expected(ParserValue::CharLiteral('\n'))) .context(Context::Expected(ParserValue::CharLiteral('#'))), ) .map_res(|((h, span), t)| state.borrow_mut().deref_mut().on_std_header(h, t, span)) - .parse(i) + .parse_next(i) } } @@ -57,18 +57,18 @@ pub(crate) fn array_table<'s, 'i>( ( delimited( ARRAY_TABLE_OPEN, - cut(key), - cut(ARRAY_TABLE_CLOSE) + cut_err(key), + cut_err(ARRAY_TABLE_CLOSE) .context(Context::Expected(ParserValue::CharLiteral('.'))) .context(Context::Expected(ParserValue::StringLiteral("]]"))), ) .with_span(), - cut(line_trailing) + cut_err(line_trailing) .context(Context::Expected(ParserValue::CharLiteral('\n'))) .context(Context::Expected(ParserValue::CharLiteral('#'))), ) .map_res(|((h, span), t)| state.borrow_mut().deref_mut().on_array_header(h, t, span)) - .parse(i) + .parse_next(i) } } @@ -84,6 +84,6 @@ pub(crate) fn table<'s, 'i>( _ => std_table(state), ) .context(Context::Expression("table header")) - .parse(i) + .parse_next(i) } } |