Skip to content

Fix clippy warnings: box large enum variant in template-app#4345

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

Fix clippy warnings: box large enum variant in template-app#4345
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1772497284-clippy-fixes-v2

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Fixes clippy::large_enum_variant warning in crates/template-app. The EnhanceUser variant is at least 264 bytes, while the second-largest variant is 48 bytes. Wrapping it in Box reduces the enum's stack size.

Changes:

  • Template::EnhanceUser(EnhanceUser)Template::EnhanceUser(Box<EnhanceUser>)
  • Updated render() match arm to dereference: &t&*t

Review & Testing Checklist for Human

  • Check for callers constructing Template::EnhanceUser(...) in macOS-only packages (excluded from clippy on Linux). These will need Box::new(...) wrapping to compile. Grep for Template::EnhanceUser( across the full codebase including Tauri plugins.
  • Verify specta::Type derive handles Box<EnhanceUser> correctly — confirm the generated TypeScript bindings still produce the expected type (not wrapping in an extra layer). Run tauri-specta type generation and diff the output.
  • Verify serde round-trip is unaffectedBox<T> should be transparent for serde, but worth a quick sanity check that Template deserializes the same as before.

Notes

Box the EnhanceUser variant which is at least 264 bytes, much larger
than the second-largest variant at 48 bytes.

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

Deploy Preview for hyprnote-storybook canceled.

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

@netlify
Copy link

netlify bot commented Mar 3, 2026

Deploy Preview for hyprnote canceled.

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

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