Skip to content

fix: apply clippy suggestions across workspace#4414

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

fix: apply clippy suggestions across workspace#4414
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1772755734-clippy-fixes

Conversation

@devin-ai-integration
Copy link
Contributor

fix: apply clippy suggestions across workspace

Summary

Ran cargo clippy --fix and manually applied remaining suggestions. Changes across 9 files:

  • Unused import removed: tauri::Manager in apps/desktop/src-tauri/src/lib.rs
  • Redundant .to_string(): removed on already-&str value in crates/analytics/src/posthog.rs
  • Missing # Safety doc: added to macro-generated unsafe extern "C" fn in crates/notification-macos/src/lib.rs
  • Let-chain conversions: collapsed nested if let statements into more concise let-chains (Rust 1.87+ stabilized feature) in:
    • crates/tiptap/src/from_ast.rs
    • plugins/fs-db/src/migrations/v1_0_2_nightly_14_extract_from_sqlite.rs
    • plugins/fs-db/src/migrations/v1_0_2_nightly_1_from_v0.rs
    • plugins/fs-db/src/version/macro.rs (4 levels → 1 chain)
    • plugins/listener/src/actors/recorder.rs
  • Unnecessary lifetime annotations: removed from group_by_session_id signatures (lifetime elision handles them)
  • Workspace fix: added plugins/cli2 to workspace exclude list (Cargo.toml) since the directory exists but has no Cargo.toml (was removed in earlier commits)

Review & Testing Checklist for Human

  • Verify let-chain semantics: The let-chain conversions (especially in plugins/fs-db/src/version/macro.rs where 4 levels collapsed into 1) should be functionally equivalent to the original nested if let statements. The indentation style is unusual but generated by clippy.
  • Test version parsing: Since version/macro.rs had complex nesting changes, verify version parsing still works correctly with various inputs (especially prerelease tags).
  • Confirm workspace compiles: The plugins/cli2 exclusion should allow cargo check to succeed without errors about missing Cargo.toml.

Notes

  • Only crates that compile on Linux were checked with clippy (macOS-specific crates like tauri-nspanel, notch, tcc, etc. were excluded)
  • Let-chain formatting follows clippy's auto-generated style; consider running cargo fmt if the indentation looks off
  • All clippy warnings resolved for compilable crates

Session: https://app.devin.ai/sessions/7a48bda866184366b928213355295c92
Requested by: bot_apk

- Remove unused import (tauri::Manager) in desktop app
- Remove unnecessary .to_string() call in posthog analytics
- Add missing Safety doc to unsafe extern C functions in notification-macos
- Use let chains instead of nested if-let in tiptap, fs-db migrations, and listener
- Remove unnecessary explicit lifetime in group_by_session_id functions
- Add plugins/cli2 to workspace exclude (no Cargo.toml present)

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

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit e5f27d5
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69aa1e6cddc92300088dea4c
😎 Deploy Preview https://deploy-preview-4414--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 6, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit e5f27d5
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69aa1e6cef87cf0007441015
😎 Deploy Preview https://deploy-preview-4414--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