Skip to content

Box big enum variants to satisfy Clippy's lint warnings#4292

Open
Keavon wants to merge 4 commits into
masterfrom
box-big-enum-variants
Open

Box big enum variants to satisfy Clippy's lint warnings#4292
Keavon wants to merge 4 commits into
masterfrom
box-big-enum-variants

Conversation

@Keavon

@Keavon Keavon commented Jun 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@Keavon Keavon requested a review from TrueDoctor June 29, 2026 02:21

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request optimizes memory layout and reduces stack usage by boxing several large enum variants and struct fields, such as wrapping TaggedValue in Box inside NodeGraphMessage::SetInputValue, LayerClickTargets in NodeTypeClickTargets::Layer, ExecutionResponse in NodeGraphUpdate::ExecutionResponse, and Expr in ParsedValueSource::Scope. The feedback suggests a minor code simplification in node_properties.rs to inline the Box creation directly within the struct initialization, which would keep the match arm concise and single-line.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 12 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

node_id,
input_index: UseJoinerInput::INDEX,
value: TaggedValue::Bool(true),
value: Box::new(TaggedValue::Bool(true)),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For these I would generally prefer to write this using .into() instead of the more verbose Box::new but this is personal preference

NodeGraphMessage::SetInputValue { node_id, input_index, value } => {
use graphene_std::vector::generator_nodes::*;

let value = *value;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a bit ugly since without inlay hints, it is a bit hard to understand what this does. We could change the name of one of the variables to make this clearer, but this is not a big issue

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