Skip to content

warning: only a 'panic!' in 'if'-then statement #226

@sylvestre

Description

@sylvestre

10 occurrences found with
cargo +nightly clippy -- -W clippy::pedantic

warning: only a `panic!` in `if`-then statement
  --> src/find/matchers/lname.rs:76:13
   |
76 | /             if e.kind() != ErrorKind::AlreadyExists {
77 | |                 panic!("Failed to create sym link: {:?}", e);
78 | |             }
   | |_____________^ help: try instead: `assert!(!(e.kind() != ErrorKind::AlreadyExists), "Failed to create sym link: {:?}", e);`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert
   = note: `-W clippy::manual-assert` implied by `-W clippy::pedantic`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions