Skip to content

Apply cargo clippy fixes and format with dprint#4440

Open
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1772841783-clippy-fixes
Open

Apply cargo clippy fixes and format with dprint#4440
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1772841783-clippy-fixes

Conversation

@devin-ai-integration
Copy link
Contributor

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

Apply cargo clippy fixes and dprint formatting

Summary

Ran cargo clippy --fix followed by cargo clippy and manually applied remaining suggestions. Then resolved merge conflicts with main and applied dprint fmt to fix import ordering for CI compliance.

Changes by category:

  • Clippy auto-fixes: Removed redundant .to_string(), simplified nested if statements to use let-chains (if let ... && let ...), removed unnecessary lifetime annotations, improved tuple field access spacing (e.g., device.0 .0 instead of device.0.0 to disambiguate from float literals)
  • Manual clippy fix: Removed unused tauri::Manager import in apps/desktop/src-tauri/src/lib.rs
  • Import reordering: Applied dprint formatting to reorder imports for consistency across Rust files
  • Workspace config: Added plugins/cli2 to workspace exclusions (directory lacks a Cargo.toml)

All changes are linting/formatting improvements with no functional changes intended.

Updates Since Last Revision

  • Merged main branch: Resolved merge conflicts by taking main's versions where conflicts occurred
  • Fixed dprint CI failure: Applied dprint fmt to ensure import ordering meets CI requirements (alphabetical/conventional ordering per rustfmt rules)

Review & Testing Checklist for Human

  • Verify let-chain refactoring is correct: In migration files (v1_0_2_nightly_14_extract_from_sqlite.rs, v1_0_2_nightly_1_from_v0.rs, version/macro.rs, recorder.rs), nested if let statements were collapsed into let-chains. Confirm the logic is equivalent
  • Spot-check tuple field access: Changes like device.0 .0 (with space) disambiguate from float literals - verify this doesn't affect behavior
  • Confirm plugins/cli2 exclusion: This directory has no Cargo.toml (only node_modules). Verify this exclusion is intentional
  • Cross-platform builds: All CI checks passed, but manually verify desktop app builds on target platforms if making a release

Test Plan

Run cargo clippy in the workspace to confirm zero warnings remain. Run dprint check to verify formatting compliance.

Notes

  • Let-chain syntax (if let ... && let ...) requires Rust 1.53+. Project uses 1.94.0 so this is safe.
  • CI checks passed including fmt (dprint) and desktop_ci (cargo check/test), confirming both formatting and compilation
  • Session: https://app.devin.ai/sessions/34b08326223c47928572f29ab3796524
  • Requested by: bot_apk

- Auto-fixed clippy suggestions via cargo clippy --fix
- Manually fixed collapsible_if in listener/recorder.rs
- Removed unused import tauri::Manager in desktop/lib.rs
- Excluded plugins/cli2 from workspace (missing Cargo.toml)
- Ran cargo fmt to ensure consistent formatting

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

Deploy Preview for hyprnote canceled.

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

@netlify
Copy link

netlify bot commented Mar 7, 2026

Deploy Preview for hyprnote-storybook canceled.

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

devin-ai-integration bot and others added 2 commits March 7, 2026 00:20
Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration devin-ai-integration bot changed the title Apply cargo clippy fixes and format with cargo fmt Apply cargo clippy fixes and format with dprint Mar 7, 2026
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