From 465a433d0d06457943017edba8f1760b96bbc4f0 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Mon, 2 Nov 2020 15:19:38 -0500 Subject: [PATCH] clippy: fix unwrap_or_else usage (#286) Removes some unwrap_or_else calls when unwrap_or would suffice that were caught by clippy nightly. --- src/canvas/widgets/basic_table_arrows.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/canvas/widgets/basic_table_arrows.rs b/src/canvas/widgets/basic_table_arrows.rs index e7169099..f9d937d4 100644 --- a/src/canvas/widgets/basic_table_arrows.rs +++ b/src/canvas/widgets/basic_table_arrows.rs @@ -51,15 +51,15 @@ impl BasicTableArrows for Painter { }, ) }) - .unwrap_or_else(|| Some(&BottomWidgetType::Temp)) - .unwrap_or_else(|| &BottomWidgetType::Temp) + .unwrap_or(Some(&BottomWidgetType::Temp)) + .unwrap_or(&BottomWidgetType::Temp) } else { &left_widget.widget_type } }) - .unwrap_or_else(|| &BottomWidgetType::Temp) + .unwrap_or(&BottomWidgetType::Temp) }) - .unwrap_or_else(|| &BottomWidgetType::Temp) + .unwrap_or(&BottomWidgetType::Temp) }, { current_table @@ -80,15 +80,15 @@ impl BasicTableArrows for Painter { &right_right_widget.widget_type }) }) - .unwrap_or_else(|| Some(&BottomWidgetType::Disk)) - .unwrap_or_else(|| &BottomWidgetType::Disk) + .unwrap_or(Some(&BottomWidgetType::Disk)) + .unwrap_or(&BottomWidgetType::Disk) } else { &right_widget.widget_type } }) - .unwrap_or_else(|| &BottomWidgetType::Disk) + .unwrap_or(&BottomWidgetType::Disk) }) - .unwrap_or_else(|| &BottomWidgetType::Disk) + .unwrap_or(&BottomWidgetType::Disk) }, );