aboutsummaryrefslogtreecommitdiffstats
path: root/src/pty.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-07-17 00:02:10 -0400
committerJesse Luehrs <doy@tozt.net>2020-07-17 00:02:10 -0400
commite743ece128ee8b78a094d3dd68243759ca4c0758 (patch)
tree60f64fb8f486f564b6029c955b83423cef62f042 /src/pty.rs
parentb2511d2a57e3b7f676dd389b7930b7c0af834d29 (diff)
downloadpty-process-e743ece128ee8b78a094d3dd68243759ca4c0758.tar.gz
pty-process-e743ece128ee8b78a094d3dd68243759ca4c0758.zip
pass by reference
Diffstat (limited to 'src/pty.rs')
-rw-r--r--src/pty.rs6
1 files changed, 3 insertions, 3 deletions
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<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)