diff --git a/godot-macros/src/docs.rs b/godot-macros/src/docs.rs index 52557f268..991f70e4d 100644 --- a/godot-macros/src/docs.rs +++ b/godot-macros/src/docs.rs @@ -20,7 +20,7 @@ pub fn make_definition_docs( let base_escaped = xml_escape(base); let desc_escaped = xml_escape(make_docs_from_attributes(description)?); let members = members - .into_iter() + .iter() .filter(|x| x.var.is_some() | x.export.is_some()) .filter_map(member) .collect::(); @@ -111,7 +111,7 @@ fn siphon_docs_from_attributes(doc: &[Attribute]) -> impl Iterator None, }) .flat_map(|doc| { - doc.into_iter().map(|x| { + doc.iter().map(|x| { x.to_string() .trim_start_matches('r') .trim_start_matches('#') @@ -125,7 +125,7 @@ fn siphon_docs_from_attributes(doc: &[Attribute]) -> impl Iterator String { // Most strings have no special characters, so this check helps avoid unnecessary string copying - if !value.contains(&['&', '<', '>', '"', '\'']) { + if !value.contains(['&', '<', '>', '"', '\'']) { return value; } diff --git a/godot-macros/src/docs/markdown_converter.rs b/godot-macros/src/docs/markdown_converter.rs index 7b93a2236..e468a82ae 100644 --- a/godot-macros/src/docs/markdown_converter.rs +++ b/godot-macros/src/docs/markdown_converter.rs @@ -79,7 +79,7 @@ fn walk_node(node: &md::Node, definitions: &HashMap<&str, &str>) -> Option html.value.clone(), - _ => walk_nodes(&node.children()?, definitions, ""), + _ => walk_nodes(node.children()?, definitions, ""), }; Some(bbcode)