From e743ece128ee8b78a094d3dd68243759ca4c0758 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 17 Jul 2020 00:02:10 -0400 Subject: pass by reference --- src/pty.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pty.rs') diff --git a/src/pty.rs b/src/pty.rs index 39ffd70..383e81d 100644 --- a/src/pty.rs +++ b/src/pty.rs @@ -34,8 +34,8 @@ impl Size { } } -impl From for nix::pty::Winsize { - fn from(size: Size) -> Self { +impl From<&Size> for nix::pty::Winsize { + fn from(size: &Size) -> Self { Self { ws_row: size.row, ws_col: size.col, @@ -78,7 +78,7 @@ impl Pty { &self.pt } - pub fn pts(&self, size: Option) -> Result { + pub fn pts(&self, size: Option<&Size>) -> Result { let fh = std::fs::OpenOptions::new() .read(true) .write(true) -- cgit v1.2.3-54-g00ecf