diff options
| author | Mroik <mroik@delayed.space> | 2026-03-11 01:14:23 +0100 |
|---|---|---|
| committer | Mroik <mroik@delayed.space> | 2026-03-11 01:14:23 +0100 |
| commit | 22e9eff0d7ae3e044ac3b61b4817ce0060c2120b (patch) | |
| tree | 16fd8e085cad2a6a810aabb26db0d4b63bda86bb /src/app.rs | |
| parent | 2c8a13769238280519fc953772a42dc2920ad84e (diff) | |
Fix some clippy stuff
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -112,8 +112,8 @@ impl App<'_> { self.mistake_count ); } - if self.error.is_some() { - println!("{}", self.error.as_ref().unwrap()); + if let Some(e) = self.error.as_ref() { + println!("{}", e); } return Ok(()); } @@ -260,7 +260,7 @@ impl App<'_> { .iter() .map(|line| line.len()) .sum::<usize>(); - for i in 0..lines[current_line].len() { + for (i, _) in lines[current_line].iter().enumerate() { if i + offset < self.state.current { self.stdout .queue(SetForegroundColor(Color::Green))? |
