From 5af123a4d92489073c8954a48994c21a04e4cefe Mon Sep 17 00:00:00 2001 From: cor Date: Mon, 23 Jun 2025 15:17:22 +0200 Subject: [PATCH] fix: address clippy warning about match single binding --- helix-term/src/ui/editor.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index c31475ee2..facab4730 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -1588,15 +1588,12 @@ impl Component for EditorView { } fn cursor(&self, _area: Rect, editor: &Editor) -> (Option, CursorKind) { - match editor.cursor() { - (pos, kind) => { - if self.terminal_focused { - (pos, kind) - } else { - // use underline cursor when terminal loses focus for visibility - (pos, CursorKind::Underline) - } - } + let (pos, kind) = editor.cursor(); + if self.terminal_focused { + (pos, kind) + } else { + // use underline cursor when terminal loses focus for visibility + (pos, CursorKind::Underline) } } }