Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
  • Loading branch information
saschagrunert committed Apr 30, 2021
1 parent 6f68d84 commit 80cd5a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ pub(crate) fn connect_neighbors<T>(
if let Some(previous) = previous {
// `previous` ==> `next`
arena[previous].next_sibling = next;
parent_first_child = parent_first_child.or_else(|| Some(previous));
parent_first_child = parent_first_child.or(Some(previous));
} else {
// `next` is the first child of the parent.
parent_first_child = next;
}
if let Some(next) = next {
// `previous` <== `next`
arena[next].previous_sibling = previous;
parent_last_child = parent_last_child.or_else(|| Some(next));
parent_last_child = parent_last_child.or(Some(next));
} else {
// `previous` is the last child of the parent.
parent_last_child = previous;
Expand Down

0 comments on commit 80cd5a1

Please sign in to comment.