diff options
author | Jesse Luehrs <doy@tozt.net> | 2023-02-05 14:09:08 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2023-02-05 14:09:08 -0500 |
commit | 0cf00851dc88ed8013a35747c803b6c83db83761 (patch) | |
tree | bcc056c47b464de63b40427ef1f33c541b06cdfb /examples/vte.rs | |
parent | f77f754a6ebe8eeabaced9caaad710bac8582ab1 (diff) | |
download | vt100-rust-0cf00851dc88ed8013a35747c803b6c83db83761.tar.gz vt100-rust-0cf00851dc88ed8013a35747c803b6c83db83761.zip |
clippy
Diffstat (limited to 'examples/vte.rs')
-rw-r--r-- | examples/vte.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/vte.rs b/examples/vte.rs index e7db674..e6d0f55 100644 --- a/examples/vte.rs +++ b/examples/vte.rs @@ -9,7 +9,7 @@ impl vte::Perform for Log { } fn execute(&mut self, byte: u8) { - println!("[execute] {:02x}", byte); + println!("[execute] {byte:02x}"); } fn hook( @@ -26,7 +26,7 @@ impl vte::Perform for Log { } fn put(&mut self, byte: u8) { - println!("[put] {:02x}", byte); + println!("[put] {byte:02x}"); } fn unhook(&mut self) { @@ -35,8 +35,7 @@ impl vte::Perform for Log { fn osc_dispatch(&mut self, params: &[&[u8]], bell_terminated: bool) { println!( - "[osc_dispatch] params={:?} bell_terminated={}", - params, bell_terminated + "[osc_dispatch] params={params:?} bell_terminated={bell_terminated}" ); } @@ -56,8 +55,7 @@ impl vte::Perform for Log { fn esc_dispatch(&mut self, intermediates: &[u8], ignore: bool, byte: u8) { println!( - "[esc_dispatch] intermediates={:?}, ignore={:?}, byte={:02x}", - intermediates, ignore, byte + "[esc_dispatch] intermediates={intermediates:?}, ignore={ignore:?}, byte={byte:02x}" ); } } @@ -77,7 +75,7 @@ fn main() { } } Err(err) => { - eprintln!("err: {}", err); + eprintln!("err: {err}"); std::process::exit(1); } } |