diff options
author | Jesse Luehrs <doy@tozt.net> | 2023-02-05 14:16:41 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2023-02-05 14:16:41 -0500 |
commit | 9656f9f0382e508c4e9d35f160a7a9e6923f66f3 (patch) | |
tree | 543a0b1421e1a0a5be869cb8a6329942354f7b11 | |
parent | 2fba99a5b7db0eab54febaecf57a4adb4b9046b6 (diff) | |
download | pty-process-9656f9f0382e508c4e9d35f160a7a9e6923f66f3.tar.gz pty-process-9656f9f0382e508c4e9d35f160a7a9e6923f66f3.zip |
clippy
-rw-r--r-- | examples/basic.rs | 8 | ||||
-rw-r--r-- | src/error.rs | 4 | ||||
-rw-r--r-- | tests/winch.rs | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/basic.rs b/examples/basic.rs index 8a56e57..db83818 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -36,7 +36,7 @@ mod main { stdout.flush().unwrap(); } Err(e) => { - eprintln!("pty read failed: {:?}", e); + eprintln!("pty read failed: {e:?}"); break; } }; @@ -48,7 +48,7 @@ mod main { pty.write_all(buf).unwrap(); } Err(e) => { - eprintln!("stdin read failed: {:?}", e); + eprintln!("stdin read failed: {e:?}"); break; } } @@ -56,7 +56,7 @@ mod main { } } Err(e) => { - println!("select failed: {:?}", e); + println!("select failed: {e:?}"); break; } } @@ -64,7 +64,7 @@ mod main { Ok(Some(_)) => break, Ok(None) => {} Err(e) => { - println!("wait failed: {:?}", e); + println!("wait failed: {e:?}"); break; } } diff --git a/src/error.rs b/src/error.rs index db9c647..8ed24e2 100644 --- a/src/error.rs +++ b/src/error.rs @@ -13,8 +13,8 @@ pub enum Error { impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::Io(e) => write!(f, "{}", e), - Self::Nix(e) => write!(f, "{}", e), + Self::Io(e) => write!(f, "{e}"), + Self::Nix(e) => write!(f, "{e}"), #[cfg(feature = "async")] Self::Unsplit(..) => { write!(f, "unsplit called on halves of two different ptys") diff --git a/tests/winch.rs b/tests/winch.rs index ae3c1a4..d97e9aa 100644 --- a/tests/winch.rs +++ b/tests/winch.rs @@ -8,7 +8,7 @@ fn test_winch_std() { let pts = pty.pts().unwrap(); pty.resize(pty_process::Size::new(24, 80)).unwrap(); let mut child = pty_process::blocking::Command::new("perl") - .args(&[ + .args([ "-E", "$|++; $SIG{WINCH} = sub { say 'WINCH' }; say 'started'; <>", ]) |