on master help sign in
dap: use smallvec! macro
commit4d24a436519d98b65f5b3b4a6f9970cc815c228f authorBlaž Hrastnik <blaz@mxxn.io> dateSun 29 Aug 2021, 23:02 (5 years ago) parent81f51c1
2 files changed+4−4
helix-core/src/lib.rs+1−1 helix-term/src/application.rs+3−3
helix-core/src/lib.rs+1−1
@@ -195,7 +195,7 @@ pub use {regex, tree_sitter};
195195pub use graphemes::RopeGraphemes;
196196pub use position::{coords_at_pos, pos_at_coords, Position};
197197pub use selection::{Range, Selection};
198−pub use smallvec::SmallVec;
198+pub use smallvec::{smallvec, SmallVec};
199199pub use syntax::Syntax;
200200
201201pub use diagnostic::Diagnostic;
helix-term/src/application.rs+3−3
@@ -327,7 +327,7 @@ impl Application {
327327 let path = path.clone();
328328 self.editor
329329 .open(path, helix_view::editor::Action::Replace)
330− .unwrap();
330+ .unwrap(); // TODO: there should be no unwrapping!
331331
332332 let (view, doc) = current!(self.editor);
333333
@@ -351,10 +351,10 @@ impl Application {
351351 .unwrap_or(0);
352352
353353 Selection::new(
354− helix_core::SmallVec::from_vec(vec![Range::new(
354+ helix_core::smallvec![Range::new(
355355 start.min(text_end),
356356 end.min(text_end),
357− )]),
357+ )],
358358 0,
359359 )
360360 } else {