fix: apply cargo clippy fixes across workspace#4335
Merged
Conversation
Co-Authored-By: bot_apk <apk@cognition.ai>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote canceled.
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
Co-Authored-By: bot_apk <apk@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mechanical clippy lint fixes applied via
cargo clippy --fixand manual edits for warnings that couldn't be auto-fixed. Changes span 11 files acrossapps/,crates/, andplugins/.Categories of fixes:
if/if let→ let-chain expressions (Rust 1.87+ syntax) invalidate.rs,entry.rs,extractor.rs,billing.rs,server/mod.rssaturating_subinstead of manual arithmetic checks inapp.rs?operator instead oflet...else { return None }inapp.rs&Pathinstead of&PathBufin function signature (audio_drop.rs)&query→query,&env→env)!(0..100).contains()instead of manual range check (ext.rs).is_multiple_of()instead of% > 0(onnx/mod.rs)Defaultimpl forCallbackServerState(server/mod.rs)plugins/extensionsto exclude list (noCargo.tomlpresent)One warning intentionally not fixed:
large_enum_variantincrates/template-app/src/lib.rs— boxing the variant would change the serde serialization shape.Updates since last revision
fmtCI failure:rustfmt --edition 2024formats let-chain opening braces on a new line (different from defaultrustfmtstyle). Applied correct formatting tovalidate.rsandentry.rs.Review & Testing Checklist for Human
if letchains incrates/tiptap/src/validate.rs(9 occurrences) preserve the original control flow — the nested braces were removed but the error-push logic should be identicalplugins/extensions/genuinely has noCargo.tomland should be excluded from the workspace (it was deleted from main but the directory glob still matches it)&PathBuf→&Pathsignature change didn't break anythingNotes
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.Requested by: bot_apk
Devin Session