From c5f58b6cccb0553172f37f4b6aac950535715bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sun, 11 Sep 2022 14:38:24 +0200 Subject: [PATCH] Remove redundant refs --- lapce-data/src/document.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lapce-data/src/document.rs b/lapce-data/src/document.rs index 3131a22b..8bb9b176 100644 --- a/lapce-data/src/document.rs +++ b/lapce-data/src/document.rs @@ -135,7 +135,7 @@ pub enum BufferContent { impl BufferContent { pub fn path(&self) -> Option<&Path> { - if let BufferContent::File(p) = &self { + if let BufferContent::File(p) = self { Some(p) } else { None @@ -147,7 +147,7 @@ pub fn is_file(&self) -> bool { } pub fn is_special(&self) -> bool { - match &self { + match self { BufferContent::File(_) => false, BufferContent::Local(local) => match local { LocalBufferKind::Search @@ -166,7 +166,7 @@ pub fn is_special(&self) -> bool { } pub fn is_input(&self) -> bool { - match &self { + match self { BufferContent::File(_) => false, BufferContent::Local(local) => match local { LocalBufferKind::Search @@ -184,7 +184,7 @@ pub fn is_input(&self) -> bool { } pub fn is_palette(&self) -> bool { - match &self { + match self { BufferContent::File(_) => false, BufferContent::SettingsValue(..) => false, BufferContent::Scratch(..) => false, @@ -193,7 +193,7 @@ pub fn is_palette(&self) -> bool { } pub fn is_search(&self) -> bool { - match &self { + match self { BufferContent::File(_) => false, BufferContent::SettingsValue(..) => false, BufferContent::Scratch(..) => false, @@ -202,7 +202,7 @@ pub fn is_search(&self) -> bool { } pub fn is_settings(&self) -> bool { - match &self { + match self { BufferContent::File(_) => false, BufferContent::SettingsValue(..) => true, BufferContent::Local(_) => false,