From 80cd5a14e3accd8ae1cf7c4a51dbd8b62b696bfb Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Fri, 30 Apr 2021 09:42:27 +0200 Subject: [PATCH] Fix clippy lints Signed-off-by: Sascha Grunert --- src/relations.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relations.rs b/src/relations.rs index 81d38ad..0fda109 100644 --- a/src/relations.rs +++ b/src/relations.rs @@ -81,7 +81,7 @@ pub(crate) fn connect_neighbors( 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; @@ -89,7 +89,7 @@ pub(crate) fn connect_neighbors( 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;