From 3feb00283df92b8865c9cf7baba0e2ab06dcc028 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Tue, 29 Sep 2020 18:02:27 +0900 Subject: clippy warnings --- helix-term/src/editor.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'helix-term') diff --git a/helix-term/src/editor.rs b/helix-term/src/editor.rs index 131c285e..a3d6a04e 100644 --- a/helix-term/src/editor.rs +++ b/helix-term/src/editor.rs @@ -209,12 +209,11 @@ impl Editor { } } - let mut line = 0; let style: Style = view.theme.get("ui.linenr").into(); - for i in view.first_line..(last_line as u16) { + for (i, line) in (view.first_line..(last_line as u16)).enumerate() { self.surface - .set_stringn(0, line, format!("{:>5}", i + 1), 5, style); // lavender - line += 1; + .set_stringn(0, line, format!("{:>5}", i + 1), 5, style); + // lavender } // let lines = state -- cgit v1.2.3-70-g09d2