Skip to content

[nightshift] code-quality: automated improvements#9

Open
nightshift-micr wants to merge 1 commit intoMicrock:mainfrom
nightshift-micr:nightshift/code-quality
Open

[nightshift] code-quality: automated improvements#9
nightshift-micr wants to merge 1 commit intoMicrock:mainfrom
nightshift-micr:nightshift/code-quality

Conversation

@nightshift-micr
Copy link
Copy Markdown

Automated by Nightshift v3 (GLM 5.1).

Task: Code Quality Fixes
Category: pr
Model: GLM 5.1

Changes

Fixed 12 clippy warnings across 10 source files:

Idiomatic Rust fixes

  • collapsible_if (7 fixes): Collapsed nested if-if let chains into single combined conditions using let-chains in yara.rs, scan.rs, verdict.rs
  • unnecessary_sort_by: Replaced sort_by(|a, b| key(a).cmp(&key(b))) with idiomatic sort_by_key in detectors/mod.rs
  • useless_conversion: Removed unnecessary .into_iter() in capability_base64_stager.rs
  • if_same_then_else: Merged duplicate if branches in capability_network.rs
  • needless_lifetimes: Removed explicit lifetime annotations in profile.rs
  • question_mark: Replaced explicit if is_none() { return None } guard with ? in main.rs

Documentation

  • Added doc comments to 7 public structs in lib.rs and malwarebazaar.rs

Verification

  • cargo check passes cleanly
  • cargo clippy passes with zero warnings

Merge if useful, close if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant