From a1272428df2e27b7f13c29f854289fa742f5bee0 Mon Sep 17 00:00:00 2001 From: Erasin Date: Mon, 18 Jul 2022 23:31:35 +0800 Subject: [PATCH] remote unused import --- helix-lsp/src/lib.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index a99dc5da6f5f..b6e364239ff1 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -58,8 +58,7 @@ pub enum OffsetEncoding { pub mod util { use super::*; - use helix_core::{Range, Rope, Transaction}; - use lsp::NumberOrString; + use helix_core::{diagnostic::NumberOrString, Range, Rope, Transaction}; /// Converts a diagnostic in the document to [`lsp::Diagnostic`]. /// @@ -81,12 +80,8 @@ pub mod util { let code = match diag.code.clone() { Some(x) => match x { - helix_core::diagnostic::NumberOrString::Number(x) => { - Some(lsp::NumberOrString::Number(x)) - } - helix_core::diagnostic::NumberOrString::String(x) => { - Some(lsp::NumberOrString::String(x)) - } + NumberOrString::Number(x) => Some(lsp::NumberOrString::Number(x)), + NumberOrString::String(x) => Some(lsp::NumberOrString::String(x)), }, None => None, };