diff options
author | Blaž Hrastnik | 2021-01-08 07:31:19 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-01-08 07:37:36 +0000 |
commit | 777a80917db01e658139da11a20ff08256667cfe (patch) | |
tree | be813dfd5f59a6f4c4db937c12769927d8d42c13 /helix-view | |
parent | 7d41550a23fc3506a37016d5bc362144fb00c080 (diff) |
Address clippy lints.
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/document.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index f32cca76..e742de46 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -4,8 +4,7 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use helix_core::{ - syntax::LOADER, ChangeSet, Diagnostic, History, Position, Range, Rope, RopeSlice, Selection, - State, Syntax, Transaction, + syntax::LOADER, ChangeSet, Diagnostic, History, Rope, Selection, State, Syntax, Transaction, }; #[derive(Copy, Clone, PartialEq, Eq, Hash)] @@ -55,7 +54,6 @@ where } } -use futures_util::TryFutureExt; use helix_lsp::lsp; use url::Url; @@ -176,7 +174,7 @@ impl Document { if !transaction.changes().is_empty() { // Compose this transaction with the previous one take_with(&mut self.changes, |changes| { - changes.compose(transaction.changes().clone()).unwrap() + changes.compose(transaction.changes().clone()) }); // TODO: when composing, replace transaction.selection too @@ -219,6 +217,8 @@ impl Document { .unwrap(); } + // TODO: undo / redo need to emit changes to lsp + // reset changeset to fix len self.changes = ChangeSet::new(self.text()); |