Skip to content

clippy: address large_enum_variant and result_large_error warnings#234

Open
ekohandel wants to merge 1 commit into197g:masterfrom
kodebooth:large-variant
Open

clippy: address large_enum_variant and result_large_error warnings#234
ekohandel wants to merge 1 commit into197g:masterfrom
kodebooth:large-variant

Conversation

@ekohandel
Copy link
Contributor

Address these warnings by boxing the large variant that is contributing to the large size of the structure.

This changes/fixes/improves …

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

@ekohandel ekohandel mentioned this pull request Jan 28, 2026
62 tasks

/// Redirect to the given url
Redirect(ErrorUrl),
Redirect(Box<ErrorUrl>),
Copy link
Owner

@197g 197g Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about the fix to the lint as applied here. If the goal is to avoid expensive moves then the number of locations where we now have (*target), which is also a kind of move in addition to the allocator, is rather high. Maybe the fields inside ErrorUrl should be smaller? The main culprit is Url hence boxing base_uri could also work. And ErrorUrl is less often destructured / moved out of.

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.

2 participants