aboutsummaryrefslogtreecommitdiff
path: root/src/tty.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2017-11-30 00:38:29 +0100
committerJoe Wilm <jwilm@users.noreply.github.com>2017-12-03 12:50:40 -0800
commitd552d28418ef192724b2b4353863708f31f325d4 (patch)
tree75c3946cc57180df816036cc22deca72fdf2afee /src/tty.rs
parented6595543b4034cb295761e1a6fb2c49762d554f (diff)
downloadalacritty-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.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tty.rs b/src/tty.rs
index 1a7fd395..ab92027b 100644
--- a/src/tty.rs
+++ b/src/tty.rs
@@ -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);
}
}