Skip to content

fix: apply cargo clippy fixes#4553

Closed
devin-ai-integration[bot] wants to merge 4 commits intomainfrom
devin/1773360201-clippy-fixes
Closed

fix: apply cargo clippy fixes#4553
devin-ai-integration[bot] wants to merge 4 commits intomainfrom
devin/1773360201-clippy-fixes

Conversation

@devin-ai-integration
Copy link
Contributor

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

Summary

Ran cargo clippy --fix and manually applied remaining clippy suggestions across the workspace. After merging main, most initial fixes were already upstream; this PR contains the remaining items.

Changes:

  • Cargo.toml: Excluded plugins/apple-contact and plugins/pdf from workspace (directories exist but have no Cargo.toml)
  • cactus/batch.rs: Flattened nested if let / if into let-chains syntax, with dprint-compliant formatting
  • soniox/live.rs: Removed unnecessary explicit lifetime annotations in partition_tokens_by_word_finality where elision applies

Review & Testing Checklist for Human

  • Verify the let-chains rewrite in crates/owhisper-client/src/adapter/cactus/batch.rs preserves the original control flow — the inner if channel.alternatives... block must still only execute when the outer pattern match succeeds. The old code was if let { if cond { body } } and the new code is if let && cond { body } — these should be equivalent, but confirm by inspection.
  • Confirm plugins/apple-contact and plugins/pdf should indeed be excluded from the Cargo workspace (they currently have no Cargo.toml)

Suggested test plan: Since these are Rust-only changes to transcription adapter code, run cargo check --workspace and cargo clippy --workspace on a macOS build environment (where more crates compile) to verify no regressions. No runtime behavior should change.

Notes

  • The 3 desktop_ci failures in CI are a pre-existing TypeScript error on main ('previewLabel' is declared but its value is never read in session-preview-card.tsx) — unrelated to this PR, which only touches Rust files and Cargo.toml. None of the failed checks are marked as required.
  • Some workspace crates (audio, tcc, notch, cactus-sys) depend on macOS-only or platform-specific libraries and could not be fully clippy-checked on Linux. Warnings in those crates were not addressed.
  • The audio crate has dead-code warnings (did_pop_chunk, convert_and_push_to_ringbuf, push_f32_to_ringbuf, has_buffered_samples) that remain — these are in a crate excluded from this check run.

Link to Devin Session: https://app.devin.ai/sessions/b9be01de46284a1982f5834efb9185e1
Requested by: bot_apk

- Remove unnecessary .to_string() in posthog event creation
- Flatten nested if-let chains using let-chains syntax
- Remove unnecessary lifetime annotations in group_by_session_id
- Add Safety doc section for unsafe extern C functions
- Exclude plugins/cli2 from workspace (no Cargo.toml)

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 13, 2026

Deploy Preview for hyprnote-storybook canceled.

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

@netlify
Copy link

netlify bot commented Mar 13, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 5dc8a7d
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69b35a8565db7500082f8bc4

devin-ai-integration bot and others added 3 commits March 13, 2026 00:17
Co-Authored-By: bot_apk <apk@cognition.ai>
- Exclude plugins/apple-contact and plugins/pdf from workspace (no Cargo.toml)
- Flatten nested if-let in cactus batch SSE parser using let-chains
- Remove unnecessary lifetime annotations in soniox partition_tokens_by_word_finality

Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
@yujonglee yujonglee closed this Mar 13, 2026
@yujonglee yujonglee deleted the devin/1773360201-clippy-fixes branch March 13, 2026 00:57
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