fix: apply cargo clippy fixes#4691
Closed
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Closed
Conversation
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-storybook canceled.
|
✅ Deploy Preview for hyprnote canceled.
|
- Remove needless Ok(x?) pattern in listener-core - Simplify boolean expression in transcript speakers - Collapse nested if-let into let-chains in tray ext - Flatten nested if-let chains in owhisper-client and transcript crates (auto-fix) - Exclude plugins/apple-contact and plugins/pdf from Cargo workspace (no Cargo.toml) Co-Authored-By: bot_apk <apk@cognition.ai>
09dd42f to
12ac519
Compare
Co-Authored-By: bot_apk <apk@cognition.ai>
Collaborator
|
Closing cargo clippy PR - no longer needed. |
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
Applies
cargo clippy --fixauto-fixes and manual fixes across the workspace:owhisper-client/cactus/batch.rs,transcript/label.rs,transcript/segments/collect.rs,transcript/segments/speakers.rs, andplugins/tray/src/ext.rstranscript/segments/speakers.rs—!word.is_final && !(a && b)→!(word.is_final || a && b)Ok(x?)wrapper: inlistener-core/actors/session/supervisor/children.rs'a: onpartition_tokens_by_word_finalityinowhisper-client/soniox/live.rsplugins/apple-contactandplugins/pdffrom Cargo workspace: directories withoutCargo.tomlthat the workspace glob picks upReview & Testing Checklist for Human
speakers.rs:148: The condition!word.is_final && !(identity.speaker_index.is_some() && identity.human_id.is_some())was rewritten as!(word.is_final || identity.speaker_index.is_some() && identity.human_id.is_some()). This relies on&&binding tighter than||in Rust — confirm the operator precedence preserves the original semantics.speakers.rsremember_identity(line ~168): Thelet Some(human_id) = identity.human_id.clone()was hoisted into the outerifchain that already checksidentity.human_id.is_some(). Confirm theinsertstill only fires under the same conditions as before.label.rs: The flattening merges only the outer two conditions; the innerif let Some(name)and thereturn "You"fallthrough remain inside the block. Confirmreturn "You"still only executes whenchannel == DirectMic && self_human_id.is_some() && name lookup fails.cargo clippyon Linux (excluding macOS-only crates). A macOS build would give full confidence.Notes
tools,control-tauri,tcc,notch,am2,cactus,llm-cactus,transcribe-cactus,local-stt-server) couldn't be checked on Linux due to macOS-only or ARM-only dependencies. Any clippy warnings in those crates remain unaddressed.dead_codewarnings remain after these fixes (unused functions/variants likely kept for future use).cactustoo-many-arguments), Windows (ringbufAPI mismatch), and e2e are pre-existing onmainand unrelated to this PR.Link to Devin session: https://app.devin.ai/sessions/727b51cae44546b3ac7e073cb73f2165