diff options
author | Matthias Krüger <matthias.krueger@famsik.de> | 2017-11-19 17:26:06 +0100 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-11-22 10:50:28 -0500 |
commit | 7ae1f373c2b899c7db5f8106dec4d7423b1d8364 (patch) | |
tree | 2106b970d1fa6c20da9f807ed3c1f9dbf5fddb82 /src/printer.rs | |
parent | 4d34132365a00219f0c0baca9e05b119621dbd79 (diff) |
clippy: fix warnings about useless format call and remove references that would be immediately dereferenced by the compiler.
Diffstat (limited to 'src/printer.rs')
-rw-r--r-- | src/printer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/printer.rs b/src/printer.rs index d18d900f..37680f9b 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -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) { |