From f45bbf165e225142b7f1d9f68d0ffcc9fabd265d Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Thu, 6 Apr 2023 02:37:43 +0200 Subject: Apply all review suggestions (doc_id -> id, error message, unnecessary if) Co-authored-by: Pascal Kuthe --- helix-view/src/editor.rs | 6 +++--- helix-view/src/gutter.rs | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'helix-view') diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 280002bd..1f27603c 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1353,10 +1353,10 @@ impl Editor { } doc.set_version_control_head(self.diff_providers.get_current_head_name(&path)); - let doc_id = self.new_document(doc); - let _ = self.launch_language_servers(doc_id); + let id = self.new_document(doc); + let _ = self.launch_language_servers(id); - doc_id + id }; self.switch(id, action); diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs index d11cbe4d..a332a8a3 100644 --- a/helix-view/src/gutter.rs +++ b/helix-view/src/gutter.rs @@ -66,9 +66,6 @@ pub fn diagnostic<'doc>( } use helix_core::diagnostic::Severity; let first_diag_idx_maybe_on_line = diagnostics.partition_point(|d| d.line < line); - if first_diag_idx_maybe_on_line == diagnostics.len() { - return None; - } let diagnostics_on_line = diagnostics[first_diag_idx_maybe_on_line..] .iter() .take_while(|d| { -- cgit v1.2.3-70-g09d2