Skip to content

fix: apply cargo clippy fixes across workspace#4335

Merged
yujonglee merged 2 commits intomainfrom
devin/1772410710-clippy-fixes-v2
Mar 2, 2026
Merged

fix: apply cargo clippy fixes across workspace#4335
yujonglee merged 2 commits intomainfrom
devin/1772410710-clippy-fixes-v2

Conversation

@devin-ai-integration
Copy link
Contributor

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

Summary

Mechanical clippy lint fixes applied via cargo clippy --fix and manual edits for warnings that couldn't be auto-fixed. Changes span 11 files across apps/, crates/, and plugins/.

Categories of fixes:

  • Collapsed nested if/if let → let-chain expressions (Rust 1.87+ syntax) in validate.rs, entry.rs, extractor.rs, billing.rs, server/mod.rs
  • saturating_sub instead of manual arithmetic checks in app.rs
  • ? operator instead of let...else { return None } in app.rs
  • &Path instead of &PathBuf in function signature (audio_drop.rs)
  • Removed needless borrows (&queryquery, &envenv)
  • !(0..100).contains() instead of manual range check (ext.rs)
  • .is_multiple_of() instead of % > 0 (onnx/mod.rs)
  • Added Default impl for CallbackServerState (server/mod.rs)
  • Workspace fix: added plugins/extensions to exclude list (no Cargo.toml present)

One warning intentionally not fixed: large_enum_variant in crates/template-app/src/lib.rs — boxing the variant would change the serde serialization shape.

Updates since last revision

  • Fixed fmt CI failure: rustfmt --edition 2024 formats let-chain opening braces on a new line (different from default rustfmt style). Applied correct formatting to validate.rs and entry.rs.

Review & Testing Checklist for Human

  • Spot-check that the collapsed if let chains in crates/tiptap/src/validate.rs (9 occurrences) preserve the original control flow — the nested braces were removed but the error-push logic should be identical
  • Confirm plugins/extensions/ genuinely has no Cargo.toml and should be excluded from the workspace (it was deleted from main but the directory glob still matches it)
  • Run integration tests for audio file dropping (CLI) to verify the &PathBuf&Path signature change didn't break anything

Notes

  • Changes were only verified on Linux via clippy. macOS-only crates (am2, notch, tcc, notification-macos, audio, audio-device, bundle, detect, device-monitor, email, intercept, mac, vad-ext, cactus) were excluded from the clippy run due to platform-specific dependencies.
  • No behavioral changes intended — all fixes are code style/idiom improvements flagged by clippy.

Requested by: bot_apk
Devin Session

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

Deploy Preview for hyprnote canceled.

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

@netlify
Copy link

netlify bot commented Mar 2, 2026

Deploy Preview for hyprnote-storybook canceled.

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

Co-Authored-By: bot_apk <apk@cognition.ai>
@yujonglee yujonglee merged commit b5d21ad into main Mar 2, 2026
17 checks passed
@yujonglee yujonglee deleted the devin/1772410710-clippy-fixes-v2 branch March 2, 2026 04:32
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