Skip to content

Commit

Permalink
Silence Clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey "Shnatsel" Davidoff <shnatsel@gmail.com>
  • Loading branch information
Shnatsel committed Nov 14, 2023
1 parent 76f32a2 commit dee098c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cargo-cyclonedx/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,12 @@ impl SbomGenerator {
// They are not part of the final build artifacts, which is what we are after.
if !(tgt.is_bench() || tgt.is_example() || tgt.is_test() || tgt.is_custom_build()) {
// classification
#[allow(clippy::if_same_then_else)]
let cdx_type = if tgt.is_bin() {
Classification::Application
// sadly no .is_proc_macro() yet
} else if tgt.kind.iter().any(|kind| kind == "proc-macro") {
// There isn't a better way to express it with CycloneDX types
Classification::Library
} else if tgt.kind.iter().any(|kind| kind.contains("lib")) {
Classification::Library
Expand Down

0 comments on commit dee098c

Please sign in to comment.