mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
Fix clippy lints.
This commit is contained in:
parent
4733afa6c2
commit
29f1be91a2
@ -22,21 +22,19 @@ pub struct BufferComponent<'a> {
|
||||
|
||||
impl BufferComponent<'_> {
|
||||
pub fn render(&self) {
|
||||
let mut line_count = 0;
|
||||
for line in &self.contents {
|
||||
for (n, line) in self.contents.iter().enumerate() {
|
||||
execute!(
|
||||
stdout(),
|
||||
SetForegroundColor(Color::DarkCyan),
|
||||
cursor::MoveTo(self.x, self.y + line_count),
|
||||
Print((line_count + 1).to_string())
|
||||
cursor::MoveTo(self.x, self.y + n as u16),
|
||||
Print((n + 1).to_string())
|
||||
);
|
||||
execute!(
|
||||
stdout(),
|
||||
SetForegroundColor(Color::Reset),
|
||||
cursor::MoveTo(self.x + 2, self.y + line_count),
|
||||
cursor::MoveTo(self.x + 2, self.y + n as u16),
|
||||
Print(line)
|
||||
);
|
||||
line_count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -129,7 +127,6 @@ pub async fn print_events(&mut self) {
|
||||
}
|
||||
Some(Ok(_)) => {
|
||||
// unhandled event
|
||||
()
|
||||
}
|
||||
Some(Err(x)) => panic!(x),
|
||||
None => break,
|
||||
|
Loading…
Reference in New Issue
Block a user