From f336104a6018ab49cea560b603c670dfef49d467 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 18 Jun 2021 17:32:31 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20use=20Option::zip=20to=20keep?= =?UTF-8?q?=20MSRV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Option::zip was introduced in 1.46.0 but our MSRV is 1.40.0. --- src/parser/html/mod.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/parser/html/mod.rs b/src/parser/html/mod.rs index 7721301..048fe78 100644 --- a/src/parser/html/mod.rs +++ b/src/parser/html/mod.rs @@ -444,15 +444,15 @@ fn get_method_groups( while let Some(subheading) = &next { if subheading.is_element(&local_name!("h3")) && subheading.has_class("impl") { - let title = subheading.first_child(); - let impl_items = subheading.next_sibling(); - if let Some((title, impl_items)) = title.zip(impl_items) { - if let Some(group) = - get_impl_items(parent, &title, &impl_items, ty, &subheading_type)? - { - groups.push(group); + if let Some(title) = subheading.first_child() { + if let Some(impl_items) = subheading.next_sibling() { + if let Some(group) = + get_impl_items(parent, &title, &impl_items, ty, &subheading_type)? + { + groups.push(group); + } + next = impl_items.next_sibling(); } - next = impl_items.next_sibling(); } } else if subheading.is_element(&local_name!("details")) { let summary = subheading.first_child(); @@ -460,15 +460,15 @@ fn get_method_groups( .as_ref() .and_then(|n| n.first_child()) .filter(|n| n.is_element(&local_name!("h3")) && n.has_class("impl")); - let title = h3.and_then(|n| n.first_child()); - let impl_items = summary.and_then(|n| n.next_sibling()); - if let Some((title, impl_items)) = title.zip(impl_items) { - if let Some(group) = - get_impl_items(parent, &title, &impl_items, ty, &subheading_type)? - { - groups.push(group); + if let Some(title) = h3.and_then(|n| n.first_child()) { + if let Some(impl_items) = summary.and_then(|n| n.next_sibling()) { + if let Some(group) = + get_impl_items(parent, &title, &impl_items, ty, &subheading_type)? + { + groups.push(group); + } + next = subheading.next_sibling(); } - next = subheading.next_sibling(); } } else { next = None;