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/render/inode.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/render/inode.rs')
-rw-r--r-- | src/output/render/inode.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output/render/inode.rs b/src/output/render/inode.rs index 4bd675e..0188de7 100644 --- a/src/output/render/inode.rs +++ b/src/output/render/inode.rs @@ -5,7 +5,7 @@ use crate::fs::fields as f; impl f::Inode { - pub fn render(&self, style: Style) -> TextCell { + pub fn render(self, style: Style) -> TextCell { TextCell::paint(style, self.0.to_string()) } } |