From 4f77d80e74b1406b8701f5569b3bec8da2e5ed03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Tue, 16 Mar 2021 13:51:22 +0900 Subject: [PATCH] Clippy lint --- TODO.md | 15 +-------------- helix-core/src/syntax.rs | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/TODO.md b/TODO.md index b3578b611..a3152f19f 100644 --- a/TODO.md +++ b/TODO.md @@ -8,16 +8,7 @@ ------ 1 -- [x] selection mode -- [x] % for whole doc selection -- [x] vertical splits -- [x] input counts (30j) - - [x] input counts for b, w, e - [ ] respect view fullscreen flag -- [x] retain horiz when moving vertically -- [w] retain horiz when moving via ctrl-u/d -- [x] deindent -- [x] update lsp on redo/undo - [ ] Implement marks (superset of Selection/Range) - [ ] ctrl-v/ctrl-x on file picker - [ ] linewise selection work @@ -25,17 +16,13 @@ - [ ] CI binary builds - [ ] regex search / select next -- [x] f / t mappings - [ ] open_above (O) command - [ ] = for auto indent line/selection - [x] q should only close the view, if all are closed, close the editor - [ ] buffers should sit on editor.buffers, view simply refs them +- [ ] yank on delete -- [ ] pressing b at start of file needs to not crash - [ ] draw separator line between views -- [ ] command to drop all selections except primary - -- [ ] diagnostic severity - [ ] lsp: signature help - [x] lsp: hover diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index acf4ad61f..2ad06befb 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -178,7 +178,7 @@ pub struct Syntax { pub(crate) root_layer: LanguageLayer, } -fn byte_range_to_str<'a>(range: std::ops::Range, source: RopeSlice<'a>) -> Cow<'a, str> { +fn byte_range_to_str(range: std::ops::Range, source: RopeSlice) -> Cow { let start_char = source.byte_to_char(range.start); let end_char = source.byte_to_char(range.end); Cow::from(source.slice(start_char..end_char))