Don’t use Option::zip to keep MSRV
Option::zip was introduced in 1.46.0 but our MSRV is 1.40.0.
This commit is contained in:
parent
68f20c8d8c
commit
f336104a60
@ -444,15 +444,15 @@ fn get_method_groups(
|
|||||||
|
|
||||||
while let Some(subheading) = &next {
|
while let Some(subheading) = &next {
|
||||||
if subheading.is_element(&local_name!("h3")) && subheading.has_class("impl") {
|
if subheading.is_element(&local_name!("h3")) && subheading.has_class("impl") {
|
||||||
let title = subheading.first_child();
|
if let Some(title) = subheading.first_child() {
|
||||||
let impl_items = subheading.next_sibling();
|
if let Some(impl_items) = subheading.next_sibling() {
|
||||||
if let Some((title, impl_items)) = title.zip(impl_items) {
|
if let Some(group) =
|
||||||
if let Some(group) =
|
get_impl_items(parent, &title, &impl_items, ty, &subheading_type)?
|
||||||
get_impl_items(parent, &title, &impl_items, ty, &subheading_type)?
|
{
|
||||||
{
|
groups.push(group);
|
||||||
groups.push(group);
|
}
|
||||||
|
next = impl_items.next_sibling();
|
||||||
}
|
}
|
||||||
next = impl_items.next_sibling();
|
|
||||||
}
|
}
|
||||||
} else if subheading.is_element(&local_name!("details")) {
|
} else if subheading.is_element(&local_name!("details")) {
|
||||||
let summary = subheading.first_child();
|
let summary = subheading.first_child();
|
||||||
@ -460,15 +460,15 @@ fn get_method_groups(
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|n| n.first_child())
|
.and_then(|n| n.first_child())
|
||||||
.filter(|n| n.is_element(&local_name!("h3")) && n.has_class("impl"));
|
.filter(|n| n.is_element(&local_name!("h3")) && n.has_class("impl"));
|
||||||
let title = h3.and_then(|n| n.first_child());
|
if let Some(title) = h3.and_then(|n| n.first_child()) {
|
||||||
let impl_items = summary.and_then(|n| n.next_sibling());
|
if let Some(impl_items) = summary.and_then(|n| n.next_sibling()) {
|
||||||
if let Some((title, impl_items)) = title.zip(impl_items) {
|
if let Some(group) =
|
||||||
if let Some(group) =
|
get_impl_items(parent, &title, &impl_items, ty, &subheading_type)?
|
||||||
get_impl_items(parent, &title, &impl_items, ty, &subheading_type)?
|
{
|
||||||
{
|
groups.push(group);
|
||||||
groups.push(group);
|
}
|
||||||
|
next = subheading.next_sibling();
|
||||||
}
|
}
|
||||||
next = subheading.next_sibling();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
next = None;
|
next = None;
|
||||||
|
Loading…
Reference in New Issue
Block a user