diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-07-17 00:02:10 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-07-17 00:02:10 -0400 |
commit | e743ece128ee8b78a094d3dd68243759ca4c0758 (patch) | |
tree | 60f64fb8f486f564b6029c955b83423cef62f042 /src/pty.rs | |
parent | b2511d2a57e3b7f676dd389b7930b7c0af834d29 (diff) | |
download | pty-process-e743ece128ee8b78a094d3dd68243759ca4c0758.tar.gz pty-process-e743ece128ee8b78a094d3dd68243759ca4c0758.zip |
pass by reference
Diffstat (limited to 'src/pty.rs')
-rw-r--r-- | src/pty.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -34,8 +34,8 @@ impl Size { } } -impl From<Size> 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<Size>) -> Result<std::fs::File> { + pub fn pts(&self, size: Option<&Size>) -> Result<std::fs::File> { let fh = std::fs::OpenOptions::new() .read(true) .write(true) |