summaryrefslogtreecommitdiffstats
path: root/vendor/toml_edit/src/parser/table.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/toml_edit/src/parser/table.rs')
-rw-r--r--vendor/toml_edit/src/parser/table.rs26
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)
}
}