mirror of
https://github.com/casey/just.git
synced 2025-08-04 15:08:39 +00:00
Placate clippy lints for 1.86 (#2708)
This commit is contained in:
parent
9322ee5357
commit
6ac3c703bb
7 changed files with 15 additions and 13 deletions
|
@ -131,7 +131,7 @@ impl<'src> Justfile<'src> {
|
|||
arguments: arguments.clone(),
|
||||
status,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
if let Some(signal) = caught {
|
||||
return Err(Error::Interrupted { signal });
|
||||
|
|
|
@ -297,7 +297,7 @@ impl<'src> Lexer<'src> {
|
|||
self.lex_body()?;
|
||||
} else {
|
||||
self.lex_normal(first)?;
|
||||
};
|
||||
}
|
||||
}
|
||||
None => break,
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ impl<'src> Lexer<'src> {
|
|||
}
|
||||
|
||||
self.token(Whitespace);
|
||||
};
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -1065,7 +1065,7 @@ impl<'run, 'src> Parser<'run, 'src> {
|
|||
return Err(self.unexpected_token()?);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
lines.push(Line { fragments, number });
|
||||
}
|
||||
|
|
|
@ -251,11 +251,12 @@ impl<'src, D> Recipe<'src, D> {
|
|||
|| (context.module.settings.quiet && !self.no_quiet())
|
||||
|| config.verbosity.quiet())
|
||||
{
|
||||
let color = config
|
||||
.highlight
|
||||
.then(|| config.color.command(config.command_color))
|
||||
.unwrap_or(config.color)
|
||||
.stderr();
|
||||
let color = if config.highlight {
|
||||
config.color.command(config.command_color)
|
||||
} else {
|
||||
config.color
|
||||
}
|
||||
.stderr();
|
||||
|
||||
if config.timestamp {
|
||||
eprint!(
|
||||
|
@ -327,7 +328,7 @@ impl<'src, D> Recipe<'src, D> {
|
|||
io_error,
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if !infallible_line {
|
||||
if let Some(signal) = caught {
|
||||
|
|
|
@ -34,7 +34,7 @@ impl<'line> Shebang<'line> {
|
|||
self
|
||||
.interpreter
|
||||
.split(['/', '\\'])
|
||||
.last()
|
||||
.next_back()
|
||||
.unwrap_or(self.interpreter)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ impl Display for ShowWhitespace<'_> {
|
|||
'\t' => write!(f, "␉")?,
|
||||
' ' => write!(f, "␠")?,
|
||||
_ => write!(f, "{c}")?,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
@ -83,7 +83,8 @@ impl SignalHandler {
|
|||
);
|
||||
|
||||
for (&child, command) in &self.children {
|
||||
message.push_str(&format!("{child}: {command:?}\n"));
|
||||
use std::fmt::Write;
|
||||
writeln!(message, "{child}: {command:?}").unwrap();
|
||||
}
|
||||
|
||||
eprint!("{message}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue