Make creating AllAstNodeIter explicit.
This is to remove the ambiguity between calling iter on the specific structs like Document and calling iter on an AstNode by having an explicitly-named function to create the iterator.
This commit is contained in:
@@ -157,7 +157,7 @@ pub(crate) fn apply_in_buffer_settings<'g, 's, 'sf>(
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
pub(crate) fn apply_post_parse_in_buffer_settings<'g, 's, 'sf>(document: &mut Document<'s>) {
|
||||
document.category = Into::<AstNode>::into(&*document)
|
||||
.into_iter()
|
||||
.iter_all_ast_nodes()
|
||||
.filter_map(|ast_node| {
|
||||
if let AstNode::Keyword(ast_node) = ast_node {
|
||||
if ast_node.key.eq_ignore_ascii_case("category") {
|
||||
|
||||
Reference in New Issue
Block a user