Skip to content

Commit d93565e

Browse files
committed
Appease clippy
1 parent 27d20f5 commit d93565e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -489,10 +489,10 @@ impl<H, const DEPTH: u8> BridgeTree<H, DEPTH> {
489489
current_bridge: Option<&NonEmptyFrontier<H>>,
490490
) -> Result<(), BridgeTreeError> {
491491
// Make sure the frontier hasn't reached the maximum depth.
492-
if let Some(frontier) = current_bridge {
493-
if frontier.position().is_complete_subtree(Level::from(DEPTH)) {
494-
return Err(BridgeTreeError::FullTree);
495-
}
492+
if let Some(frontier) = current_bridge
493+
&& frontier.position().is_complete_subtree(Level::from(DEPTH))
494+
{
495+
return Err(BridgeTreeError::FullTree);
496496
}
497497

498498
// Make sure the bridges are ordered in ascending order,
@@ -502,10 +502,10 @@ impl<H, const DEPTH: u8> BridgeTree<H, DEPTH> {
502502
return Err(BridgeTreeError::Discontinuity);
503503
}
504504
}
505-
if let Some((prev, next)) = prior_bridges.last().zip(current_bridge) {
506-
if prev.position() > next.position() {
507-
return Err(BridgeTreeError::Discontinuity);
508-
}
505+
if let Some((prev, next)) = prior_bridges.last().zip(current_bridge)
506+
&& prev.position() > next.position()
507+
{
508+
return Err(BridgeTreeError::Discontinuity);
509509
}
510510

511511
Ok(())

0 commit comments

Comments
 (0)