Fix all lints that are new with Rust 1.54

They are all of the following type:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
This commit is contained in:
Martin Nordholts
2021-08-18 20:37:38 +02:00
parent cbd96237fd
commit ed09f90e5e
7 changed files with 16 additions and 16 deletions

View File

@ -45,7 +45,7 @@ impl<'b> Controller<'b> {
// Do not launch the pager if NONE of the input files exist
let mut paging_mode = self.config.paging_mode;
if self.config.paging_mode != PagingMode::Never {
let call_pager = inputs.iter().any(|ref input| {
let call_pager = inputs.iter().any(|input| {
if let InputKind::OrdinaryFile(ref path) = input.kind {
Path::new(path).exists()
} else {
@ -124,11 +124,11 @@ impl<'b> Controller<'b> {
};
let mut printer: Box<dyn Printer> = if self.config.loop_through {
Box::new(SimplePrinter::new(&self.config))
Box::new(SimplePrinter::new(self.config))
} else {
Box::new(InteractivePrinter::new(
&self.config,
&self.assets,
self.config,
self.assets,
&mut opened_input,
#[cfg(feature = "git")]
&line_changes,