mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-12 16:08:38 +00:00
Fix clippy::needless_lifetimes
warnings
This commit is contained in:
parent
bc24ce9ad4
commit
52252b15d6
@ -370,7 +370,7 @@ mod tests {
|
||||
pub temp_dir: TempDir,
|
||||
}
|
||||
|
||||
impl<'a> SyntaxDetectionTest<'a> {
|
||||
impl SyntaxDetectionTest<'_> {
|
||||
fn new() -> Self {
|
||||
SyntaxDetectionTest {
|
||||
assets: HighlightingAssets::from_binary(),
|
||||
|
@ -25,7 +25,7 @@ pub struct Controller<'a> {
|
||||
preprocessor: Option<LessOpenPreprocessor>,
|
||||
}
|
||||
|
||||
impl<'b> Controller<'b> {
|
||||
impl Controller<'_> {
|
||||
pub fn new<'a>(config: &'a Config, assets: &'a HighlightingAssets) -> Controller<'a> {
|
||||
Controller {
|
||||
config,
|
||||
|
@ -75,7 +75,7 @@ pub(crate) enum InputKind<'a> {
|
||||
CustomReader(Box<dyn Read + 'a>),
|
||||
}
|
||||
|
||||
impl<'a> InputKind<'a> {
|
||||
impl InputKind<'_> {
|
||||
pub fn description(&self) -> InputDescription {
|
||||
match self {
|
||||
InputKind::OrdinaryFile(ref path) => InputDescription::new(path.to_string_lossy()),
|
||||
|
@ -73,7 +73,7 @@ pub enum OutputHandle<'a> {
|
||||
FmtWrite(&'a mut dyn fmt::Write),
|
||||
}
|
||||
|
||||
impl<'a> OutputHandle<'a> {
|
||||
impl OutputHandle<'_> {
|
||||
fn write_fmt(&mut self, args: fmt::Arguments<'_>) -> Result<()> {
|
||||
match self {
|
||||
Self::IoWrite(handle) => handle.write_fmt(args).map_err(Into::into),
|
||||
@ -116,7 +116,7 @@ impl<'a> SimplePrinter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Printer for SimplePrinter<'a> {
|
||||
impl Printer for SimplePrinter<'_> {
|
||||
fn print_header(
|
||||
&mut self,
|
||||
_handle: &mut OutputHandle,
|
||||
@ -448,7 +448,7 @@ impl<'a> InteractivePrinter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Printer for InteractivePrinter<'a> {
|
||||
impl Printer for InteractivePrinter<'_> {
|
||||
fn print_header(
|
||||
&mut self,
|
||||
handle: &mut OutputHandle,
|
||||
|
@ -61,7 +61,7 @@ pub struct SyntaxMapping<'a> {
|
||||
halt_glob_build: Arc<AtomicBool>,
|
||||
}
|
||||
|
||||
impl<'a> Drop for SyntaxMapping<'a> {
|
||||
impl Drop for SyntaxMapping<'_> {
|
||||
fn drop(&mut self) {
|
||||
// signal the offload thread to halt early
|
||||
self.halt_glob_build.store(true, Ordering::Relaxed);
|
||||
|
@ -539,7 +539,7 @@ impl<'a> EscapeSequenceOffsetsIterator<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Iterator for EscapeSequenceOffsetsIterator<'a> {
|
||||
impl Iterator for EscapeSequenceOffsetsIterator<'_> {
|
||||
type Item = EscapeSequenceOffsets;
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
match self.chars.peek() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user