Skip to content

Commit 9949670

Browse files
committed
Apply new Clippy lints
1 parent f146553 commit 9949670

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/cmd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub struct CargoSubcommand<'out> {
125125
output: Option<&'out mut Vec<u8>>,
126126
}
127127

128-
impl<'out> CargoSubcommand<'out> {
128+
impl CargoSubcommand<'_> {
129129
#[inline]
130130
pub fn args<'arg, I>(&mut self, args: I) -> &mut Self
131131
where

src/term.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ use std::{
1111

1212
use crate::app_state::CheckProgress;
1313

14-
pub struct MaxLenWriter<'a, 'b> {
15-
pub stdout: &'a mut StdoutLock<'b>,
14+
pub struct MaxLenWriter<'a, 'lock> {
15+
pub stdout: &'a mut StdoutLock<'lock>,
1616
len: usize,
1717
max_len: usize,
1818
}
1919

20-
impl<'a, 'b> MaxLenWriter<'a, 'b> {
20+
impl<'a, 'lock> MaxLenWriter<'a, 'lock> {
2121
#[inline]
22-
pub fn new(stdout: &'a mut StdoutLock<'b>, max_len: usize) -> Self {
22+
pub fn new(stdout: &'a mut StdoutLock<'lock>, max_len: usize) -> Self {
2323
Self {
2424
stdout,
2525
len: 0,
@@ -34,13 +34,13 @@ impl<'a, 'b> MaxLenWriter<'a, 'b> {
3434
}
3535
}
3636

37-
pub trait CountedWrite<'a> {
37+
pub trait CountedWrite<'lock> {
3838
fn write_ascii(&mut self, ascii: &[u8]) -> io::Result<()>;
3939
fn write_str(&mut self, unicode: &str) -> io::Result<()>;
40-
fn stdout(&mut self) -> &mut StdoutLock<'a>;
40+
fn stdout(&mut self) -> &mut StdoutLock<'lock>;
4141
}
4242

43-
impl<'a, 'b> CountedWrite<'b> for MaxLenWriter<'a, 'b> {
43+
impl<'lock> CountedWrite<'lock> for MaxLenWriter<'_, 'lock> {
4444
fn write_ascii(&mut self, ascii: &[u8]) -> io::Result<()> {
4545
let n = ascii.len().min(self.max_len.saturating_sub(self.len));
4646
if n > 0 {
@@ -65,7 +65,7 @@ impl<'a, 'b> CountedWrite<'b> for MaxLenWriter<'a, 'b> {
6565
}
6666

6767
#[inline]
68-
fn stdout(&mut self) -> &mut StdoutLock<'b> {
68+
fn stdout(&mut self) -> &mut StdoutLock<'lock> {
6969
self.stdout
7070
}
7171
}
@@ -87,17 +87,17 @@ impl<'a> CountedWrite<'a> for StdoutLock<'a> {
8787
}
8888
}
8989

90-
pub struct CheckProgressVisualizer<'a, 'b> {
91-
stdout: &'a mut StdoutLock<'b>,
90+
pub struct CheckProgressVisualizer<'a, 'lock> {
91+
stdout: &'a mut StdoutLock<'lock>,
9292
n_cols: usize,
9393
}
9494

95-
impl<'a, 'b> CheckProgressVisualizer<'a, 'b> {
95+
impl<'a, 'lock> CheckProgressVisualizer<'a, 'lock> {
9696
const CHECKING_COLOR: Color = Color::Blue;
9797
const DONE_COLOR: Color = Color::Green;
9898
const PENDING_COLOR: Color = Color::Red;
9999

100-
pub fn build(stdout: &'a mut StdoutLock<'b>, term_width: u16) -> io::Result<Self> {
100+
pub fn build(stdout: &'a mut StdoutLock<'lock>, term_width: u16) -> io::Result<Self> {
101101
clear_terminal(stdout)?;
102102
stdout.write_all("Checking all exercises…\n".as_bytes())?;
103103

0 commit comments

Comments
 (0)