Skip to content

fix: apply cargo clippy fixes#4649

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1773878670-clippy-fixes
Open

fix: apply cargo clippy fixes#4649
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1773878670-clippy-fixes

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Applies cargo clippy --fix auto-fixes and one manual fix across the workspace:

  • Unused import: Removed use tauri::Manager in desktop app
  • Redundant conversion: Removed unnecessary &distinct_id.to_string()distinct_id in posthog analytics
  • Collapsible if-let chains: Collapsed nested if/if let blocks into Rust let-chains in tiptap, fs-db (2 migration files + version parser), and listener
  • Unnecessary lifetimes: Removed explicit lifetime annotations where elision suffices in group_by_session_id (2 occurrences in fs-db migrations)
  • Missing # Safety doc: Added safety documentation to unsafe extern "C" functions in notification-macos macro
  • Workspace fix: Added plugins/cli2 to Cargo.toml exclude list (directory exists with only node_modules, no Cargo.toml, breaking the plugins/* glob)

Review & Testing Checklist for Human

  • Verify the plugins/cli2 exclusion in Cargo.toml is correct — this was needed because the directory has no Cargo.toml but was picked up by the plugins/* workspace glob. Confirm cli2 is indeed a JS-only plugin that shouldn't be a Cargo workspace member.
  • Spot-check the let-chain refactors (especially crates/tiptap/src/from_ast.rs and plugins/fs-db/src/version/macro.rs) — they were auto-applied by cargo clippy --fix and the indentation looks slightly unusual, though the logic should be semantically identical to the original nested if blocks.
  • Run cargo clippy on macOS to verify the excluded macOS-only crates (notch, am2, tcc, control-tauri) also pass cleanly — these couldn't be checked on Linux due to missing swift_rs/objc2 dependencies.

Notes

  • Several workspace crates (tools, control-tauri, notch, am2, tcc) could not be compiled on Linux due to macOS-only dependencies (swift_rs, objc2_app_kit, libspa/pipewire). These were excluded from the clippy run but are not modified in this PR.
  • The let-chain syntax requires Rust 1.87+; the project toolchain is 1.92.0 so this is fine.

Link to Devin session: https://app.devin.ai/sessions/b7c8ae79466b496b9fe23b1dc0b2a6e2

- Remove unused import (tauri::Manager) in desktop app
- Fix clippy warnings across analytics, tiptap, fs-db, and listener crates
- Add missing Safety docs to unsafe functions in notification-macos
- Exclude plugins/cli2 from Cargo workspace (missing 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 19, 2026

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 8e88017
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69bb40a16adfe50008ab304e
😎 Deploy Preview https://deploy-preview-4649--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Mar 19, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 8e88017
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69bb40a1e3fdd20008c5d295
😎 Deploy Preview https://deploy-preview-4649--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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