diff options
author | Benjamin Sago <ogham@bsago.me> | 2020-10-10 15:30:19 +0100 |
---|---|---|
committer | Benjamin Sago <ogham@bsago.me> | 2020-10-10 15:30:19 +0100 |
commit | f0c139ca682178e5cf4e735c0d7621719e73f6a0 (patch) | |
tree | 466fe7270a5dc7360f494a0e5c8c9b24d576c0cf /src/output/lines.rs | |
parent | 70a30ed683ecc88304c6b2d66b6d34d61a1dd072 (diff) |
Better referencing
This commit makes changes to the way variables are referenced:
• Make types Copy when possible
• Make methods take `self` instead of `&self` where possible (trivially_copy_pass_by_ref)
• Remove unnecessary borrowing (needless_ref)
• Remove unnecessary cloning (clone_on_copy)
• Remove `ref` from match arms where possible (new Rust match ergonomics)
Diffstat (limited to 'src/output/lines.rs')
-rw-r--r-- | src/output/lines.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output/lines.rs b/src/output/lines.rs index 22407c2..c92e9e4 100644 --- a/src/output/lines.rs +++ b/src/output/lines.rs @@ -28,7 +28,7 @@ impl<'a> Render<'a> { if self.opts.icons { // Create a TextCell for the icon then append the text to it let mut cell = TextCell::default(); - let icon = painted_icon(&file, self.style); + let icon = painted_icon(file, self.style); cell.push(ANSIGenericString::from(icon), 2); cell.append(name_cell.promote()); writeln!(w, "{}", ANSIStrings(&cell))?; |