Skip to content

Commit 4e8dfc0

Browse files
committed
Fix clippy::needless_borrow warning
``` error: the borrowed expression implements the required traits --> src/lib.rs:212:57 | 212 | signal_hook::iterator::Signals::new(&[signal_hook::consts::SIGCHLD]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[signal_hook::consts::SIGCHLD]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `-D clippy::needless-borrow` implied by `-D warnings` ```
1 parent dd0f910 commit 4e8dfc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl Child {
209209

210210
// Make sure the signal handler is registered before interacting with the process.
211211
SIGNALS.get_or_init_blocking(|| Mutex::new(
212-
signal_hook::iterator::Signals::new(&[signal_hook::consts::SIGCHLD])
212+
signal_hook::iterator::Signals::new([signal_hook::consts::SIGCHLD])
213213
.expect("cannot set signal handler for SIGCHLD"),
214214
));
215215

0 commit comments

Comments
 (0)