diff options
author | Matthias Krüger <matthias.krueger@famsik.de> | 2017-11-30 00:38:29 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-03 12:50:40 -0800 |
commit | d552d28418ef192724b2b4353863708f31f325d4 (patch) | |
tree | 75c3946cc57180df816036cc22deca72fdf2afee /src/tty.rs | |
parent | ed6595543b4034cb295761e1a6fb2c49762d554f (diff) | |
download | alacritty-d552d28418ef192724b2b4353863708f31f325d4.tar.gz alacritty-d552d28418ef192724b2b4353863708f31f325d4.zip |
clippy: do and don't pass some things by reference as suggested (needless_pass_by_value, needless_borrow).
Diffstat (limited to 'src/tty.rs')
-rw-r--r-- | src/tty.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -262,7 +262,7 @@ pub fn new<T: ToWinsize>(config: &Config, options: &Options, size: T, window_id: } let pty = Pty { fd: master }; - pty.resize(size); + pty.resize(&size); pty }, Err(err) => { @@ -289,7 +289,7 @@ impl Pty { /// /// Tells the kernel that the window size changed with the new pixel /// dimensions and line/column counts. - pub fn resize<T: ToWinsize>(&self, size: T) { + pub fn resize<T: ToWinsize>(&self, size: &T) { let win = size.to_winsize(); let res = unsafe { @@ -321,7 +321,7 @@ impl<'a> ToWinsize for &'a SizeInfo { impl OnResize for Pty { fn on_resize(&mut self, size: &SizeInfo) { - self.resize(size); + self.resize(&size); } } |