clippy: fix warnings about useless format call and remove references that would be immediately dereferenced by the compiler.
This commit is contained in:
committed by
Andrew Gallant
parent
4d34132365
commit
7ae1f373c2
@@ -397,7 +397,7 @@ impl<W: WriteColor> Printer<W> {
|
||||
self.line_number(line_number, b'-');
|
||||
}
|
||||
if self.max_columns.map_or(false, |m| end - start > m) {
|
||||
self.write(format!("[Omitted long context line]").as_bytes());
|
||||
self.write(b"[Omitted long context line]");
|
||||
self.write_eol();
|
||||
return;
|
||||
}
|
||||
@@ -408,7 +408,7 @@ impl<W: WriteColor> Printer<W> {
|
||||
}
|
||||
|
||||
fn separator(&mut self, sep: &[u8]) {
|
||||
self.write(&sep);
|
||||
self.write(sep);
|
||||
}
|
||||
|
||||
fn write_path_sep(&mut self, sep: u8) {
|
||||
|
||||
Reference in New Issue
Block a user