From 4d24a436519d98b65f5b3b4a6f9970cc815c228f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sun, 29 Aug 2021 23:02:46 +0900 Subject: [PATCH] dap: use smallvec! macro --- helix-core/src/lib.rs | 2 +- helix-term/src/application.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs index d971464a8..0854eb04a 100644 --- a/helix-core/src/lib.rs +++ b/helix-core/src/lib.rs @@ -195,7 +195,7 @@ pub use {regex, tree_sitter}; pub use graphemes::RopeGraphemes; pub use position::{coords_at_pos, pos_at_coords, Position}; pub use selection::{Range, Selection}; -pub use smallvec::SmallVec; +pub use smallvec::{smallvec, SmallVec}; pub use syntax::Syntax; pub use diagnostic::Diagnostic; diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 70abc7839..193ea5053 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -327,7 +327,7 @@ impl Application { let path = path.clone(); self.editor .open(path, helix_view::editor::Action::Replace) - .unwrap(); + .unwrap(); // TODO: there should be no unwrapping! let (view, doc) = current!(self.editor); @@ -351,10 +351,10 @@ impl Application { .unwrap_or(0); Selection::new( - helix_core::SmallVec::from_vec(vec![Range::new( + helix_core::smallvec![Range::new( start.min(text_end), end.min(text_end), - )]), + )], 0, ) } else {