Skip to content

fix: apply cargo clippy fixes#4310

Closed
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1772236919-clippy-fixes
Closed

fix: apply cargo clippy fixes#4310
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1772236919-clippy-fixes

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 28, 2026

Summary

Ran cargo clippy --fix followed by cargo clippy to resolve all remaining warnings. Changes include both auto-applied and manually-applied fixes across 9 files.

Auto-fixed by cargo clippy --fix:

  • Removed redundant .to_string() on an already-&str value (posthog.rs)
  • Removed unnecessary lifetime annotations where elision suffices (group_by_session_id in two migration files)
  • Collapsed nested if/if let blocks into let-chains (from_ast.rs, two migration files, version/macro.rs, recorder.rs)

Manually fixed:

  • Removed unused use tauri::Manager import (desktop/lib.rs)
  • Added # Safety doc section to unsafe extern "C" functions generated by macro (notification-macos)

Workspace fix:

  • Excluded plugins/cli2 from workspace (directory exists but has no Cargo.toml, only node_modules)

Review & Testing Checklist for Human

  • Verify CI passes with Rust 1.87+ toolchain — the let-chain syntax (if let ... && let ...) requires Rust 1.87.0+. If any CI job uses an older toolchain, this will break.
  • Check let-chain indentation — Some auto-fixed let-chains (e.g., from_ast.rs:25-31, version/macro.rs:27-31) have unusual indentation. Verify they match project formatting conventions or run cargo fmt.
  • Verify lifetime elision is correct — The group_by_session_id functions had explicit lifetimes removed. Rust's elision rules should handle this correctly, but worth a quick sanity check.
  • Confirm tauri::Manager removal doesn't break macOS builds — The import was removed entirely. Verify it's not needed on macOS (or if it is, that it's re-exported through ext::* or store::*).

Notes

  • The plugins/cli2 exclude is a workaround for a directory that has node_modules but no Cargo.toml. If someone adds a Cargo.toml there later, this exclude should be removed.
  • I excluded several macOS-only packages (tools, control-tauri, tcc, notch, am2) from clippy checks since they require macOS-specific dependencies that don't compile on Linux. The fixes applied are for the cross-platform code only.
  • All remaining clippy warnings after these fixes are from macOS-only code or external dependencies.
  • Desktop CI failures (linux-aarch64, linux-x86_64) are from an unrelated test failure in owhisper-client::adapter::elevenlabs::live::tests::test_default_params and are not caused by these changes. The fmt check is passing.

Link to Devin run: https://app.devin.ai/sessions/8f0aa93729ae44778dad7fbbbe26e4d5
Requested by: bot_apk

@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 Feb 28, 2026

Deploy Preview for hyprnote canceled.

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

@netlify
Copy link

netlify bot commented Feb 28, 2026

Deploy Preview for hyprnote-storybook failed.

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

Auto-fixed by cargo clippy --fix:
- Simplify nested if-let chains in tiptap/validate.rs
- Remove unnecessary .to_string() in api/main.rs
- Collapse nested if blocks in deeplink2/server/mod.rs

Manually fixed:
- Box large enum variant EnhanceUser in template-app to fix large_enum_variant warning

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration devin-ai-integration bot force-pushed the devin/1772236919-clippy-fixes branch from c0e2059 to 0de7b5e Compare February 28, 2026 00:28
Co-Authored-By: bot_apk <apk@cognition.ai>
@yujonglee yujonglee closed this Feb 28, 2026
@yujonglee yujonglee deleted the devin/1772236919-clippy-fixes branch February 28, 2026 02:28
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.

1 participant