Box big enum variants to satisfy Clippy's lint warnings#4292
Conversation
There was a problem hiding this comment.
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.
| node_id, | ||
| input_index: UseJoinerInput::INDEX, | ||
| value: TaggedValue::Bool(true), | ||
| value: Box::new(TaggedValue::Bool(true)), |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
No description provided.