Skip to content

fix: apply clippy fixes#4688

Open
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1774052256-clippy-fixes-v2
Open

fix: apply clippy fixes#4688
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1774052256-clippy-fixes-v2

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 21, 2026

Summary

Ran cargo clippy --fix and manually applied remaining suggestions. Changes across 6 files:

  • Cargo.toml: Exclude plugins/apple-contact and plugins/pdf from workspace — these directories exist but have no Cargo.toml (only node_modules), breaking the plugins/* glob
  • speakers.rs: Simplify boolean expression (nonminimal_bool): !word.is_final && !(a && b)!(word.is_final || a && b) via De Morgan's law
  • batch.rs, label.rs, collect.rs, speakers.rs: Collapse nested if/if let blocks into let-chains (collapsible_if)
  • soniox/live.rs: Remove unnecessary explicit lifetime annotation (needless_lifetimes)

Followed up with dprint fmt to satisfy the fmt CI check.

Review & Testing Checklist for Human

  • Verify the boolean simplification in speakers.rs:132 is logically equivalent — !x && !(a && b) should equal !(x || a && b) by De Morgan's law, relying on && binding tighter than ||
  • Spot-check that let-chain rewrites in speakers.rs (lines 121-140) preserve the original control flow, especially the fallthrough paths when conditions are false
  • In remember_identity (speakers.rs:166-170), the collapsed && let Some(human_id) = identity.human_id.clone() is guarded by identity.human_id.is_some() — confirm this is always redundant and safe to flatten
  • Confirm plugins/apple-contact and plugins/pdf genuinely have no Rust code that should be compiled (they only contain node_modules/)

Notes

  • All changes are mechanical clippy suggestions — no behavioral logic was intentionally altered.
  • CI failures in check (ubuntu/windows/macos), desktop_ci (linux-*), and downstream ci are pre-existing cli crate build errors (could not find 'process' in 'tokio') unrelated to this PR. The fmt check passes, and desktop_ci (macos) passes.
  • Could not fully build on Linux: external crate libspa has a version mismatch with the system libpipewire-0.3, and macOS-only crates (objc2_app_kit, etc.) can't compile. This means the tools crate and macOS-specific crates were not linted. All other workspace crates were checked with zero remaining clippy warnings.

Link to Devin session: https://app.devin.ai/sessions/0c461d1399df4743963df3efc478e350

- Exclude plugins/apple-contact and plugins/pdf from workspace (missing Cargo.toml)
- Simplify boolean expression in transcript speakers.rs (nonminimal_bool)
- Remove unnecessary lifetime annotations (clippy auto-fix)
- Collapse nested if-let chains into let-chains (clippy auto-fix)
- Remove redundant closures (clippy auto-fix)

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Mar 21, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit c33d338
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69bde7771ab3d800089a0ba4

@netlify
Copy link

netlify bot commented Mar 21, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit c33d338
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69bde7772923be00080e5deb

Co-Authored-By: bot_apk <apk@cognition.ai>
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.

0 participants