dap: use smallvec! macro

pull/574/head
Blaž Hrastnik 3 years ago
parent 81f51c13fa
commit 4d24a43651

@ -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;

@ -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 {

Loading…
Cancel
Save