From 1021a875498d375c26088f7d75d1f59de6401274 Mon Sep 17 00:00:00 2001 From: Pi-Cla Date: Mon, 12 Aug 2024 22:58:22 -0600 Subject: [PATCH] Clippy fixes --- src/in-depth/signals-hooked.rs | 2 +- src/tutorial/cli-args-struct.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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), };