From 777a80917db01e658139da11a20ff08256667cfe Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 8 Jan 2021 16:31:19 +0900 Subject: Address clippy lints. --- helix-view/src/document.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'helix-view/src') 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()); -- cgit v1.2.3-70-g09d2