From 3d987c07035d014344d44c974896a8eeb61aaa6a Mon Sep 17 00:00:00 2001 From: Roland Singer Date: Wed, 21 Sep 2022 12:13:31 +0200 Subject: [PATCH] removed match --- helix-view/src/editor.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 61bb96e2..dc71e65a 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -134,31 +134,19 @@ pub struct ExplorerConfig { impl ExplorerConfig { pub fn is_embed(&self) -> bool { - match self.position { - ExplorerPosition::Embed => true, - ExplorerPosition::Overlay => false, - } + return self.position == ExplorerPosition::Embed; } pub fn is_overlay(&self) -> bool { - match self.position { - ExplorerPosition::Embed => false, - ExplorerPosition::Overlay => true, - } + return self.position == ExplorerPosition::Overlay; } pub fn is_list(&self) -> bool { - match self.style { - ExplorerStyle::List => true, - ExplorerStyle::Tree => false, - } + return self.style == ExplorerStyle::List; } pub fn is_tree(&self) -> bool { - match self.style { - ExplorerStyle::List => false, - ExplorerStyle::Tree => true, - } + return self.style == ExplorerStyle::Tree; } }