diff --git a/src/in-depth/signals-hooked.rs b/src/in-depth/signals-hooked.rs index 958da3b..c22a327 100644 --- a/src/in-depth/signals-hooked.rs +++ b/src/in-depth/signals-hooked.rs @@ -2,7 +2,7 @@ use signal_hook::{consts::SIGINT, iterator::Signals}; use std::{error::Error, thread, time::Duration}; fn main() -> Result<(), Box> { - let mut signals = Signals::new(&[SIGINT])?; + let mut signals = Signals::new([SIGINT])?; thread::spawn(move || { for sig in signals.forever() { diff --git a/src/tutorial/cli-args-struct.rs b/src/tutorial/cli-args-struct.rs index 3bb2fe2..5a6460b 100644 --- a/src/tutorial/cli-args-struct.rs +++ b/src/tutorial/cli-args-struct.rs @@ -8,7 +8,7 @@ fn main() { let path = std::env::args().nth(2).expect("no path given"); let args = Cli { - pattern: pattern, + pattern, path: std::path::PathBuf::from(path), };