diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-11-02 15:19:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 15:19:38 -0500 |
commit | 465a433d0d06457943017edba8f1760b96bbc4f0 (patch) | |
tree | 0586be5239a14970ad3dde089bc4108d570f4c64 /src/canvas/widgets/basic_table_arrows.rs | |
parent | 271592936b5cecc079ab0cbc9d7b1a52af184c8d (diff) |
clippy: fix unwrap_or_else usage (#286)
Removes some unwrap_or_else calls when unwrap_or would suffice that were caught by clippy nightly.
Diffstat (limited to 'src/canvas/widgets/basic_table_arrows.rs')
-rw-r--r-- | src/canvas/widgets/basic_table_arrows.rs | 16 |
1 files 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) }, ); |