smol-rs / async-signal

Asynchronous signal handling
Apache License 2.0
15 stars 6 forks source link

docs: fix clippy lint in readme example #38

Closed jbr closed 3 months ago

jbr commented 3 months ago

The readme example before this change resulted in this clippy warning:

warning: the borrowed expression implements the required traits
 --> examples/readme.rs:8:40
  |
8 |         let mut signals = Signals::new(&[Signal::Term, Signal::Quit, Signal::Int]).unwrap();
  |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[Signal::Term, Signal::Quit, Signal::Int]`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
  = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default