Skip to content

Commit ebead52

Browse files
committed
Manual cleanup
1 parent 41edb07 commit ebead52

File tree

25 files changed

+330
-427
lines changed

25 files changed

+330
-427
lines changed

editor/src/messages/layout/utility_types/layout_widget.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,13 @@ pub enum Layout {
105105

106106
impl Layout {
107107
pub fn unwrap_menu_layout(self, action_input_mapping: &impl Fn(&MessageDiscriminant) -> Vec<KeysGroup>) -> MenuLayout {
108-
match self {
109-
Self::MenuLayout(mut menu) => {
110-
menu.layout
111-
.iter_mut()
112-
.for_each(|menu_column| menu_column.children.fill_in_shortcut_actions_with_keys(action_input_mapping));
113-
menu
114-
}
115-
_ => {
116-
panic!("Called unwrap_menu_layout on a widget layout");
117-
}
108+
if let Self::MenuLayout(mut menu) = self {
109+
menu.layout
110+
.iter_mut()
111+
.for_each(|menu_column| menu_column.children.fill_in_shortcut_actions_with_keys(action_input_mapping));
112+
menu
113+
} else {
114+
panic!("Called unwrap_menu_layout on a widget layout");
118115
}
119116
}
120117

editor/src/messages/portfolio/document/document_message_handler.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,28 +1480,28 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
14801480

14811481
impl DocumentMessageHandler {
14821482
/// Runs an intersection test with all layers and a viewport space quad
1483-
pub fn intersect_quad<'a>(&'a self, viewport_quad: graphene_core::renderer::Quad, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + 'a + use<'a> {
1483+
pub fn intersect_quad<'a>(&'a self, viewport_quad: graphene_core::renderer::Quad, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + use<'a> {
14841484
let document_to_viewport = self.navigation_handler.calculate_offset_transform(ipp.viewport_bounds.center(), &self.document_ptz);
14851485
let document_quad = document_to_viewport.inverse() * viewport_quad;
14861486

14871487
ClickXRayIter::new(&self.network_interface, XRayTarget::Quad(document_quad))
14881488
}
14891489

14901490
/// Runs an intersection test with all layers and a viewport space quad; ignoring artboards
1491-
pub fn intersect_quad_no_artboards<'a>(&'a self, viewport_quad: graphene_core::renderer::Quad, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + 'a + use<'a> {
1491+
pub fn intersect_quad_no_artboards<'a>(&'a self, viewport_quad: graphene_core::renderer::Quad, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + use<'a> {
14921492
self.intersect_quad(viewport_quad, ipp).filter(|layer| !self.network_interface.is_artboard(&layer.to_node(), &[]))
14931493
}
14941494

14951495
/// Runs an intersection test with all layers and a viewport space subpath
1496-
pub fn intersect_polygon<'a>(&'a self, mut viewport_polygon: Subpath<PointId>, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + 'a + use<'a> {
1496+
pub fn intersect_polygon<'a>(&'a self, mut viewport_polygon: Subpath<PointId>, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + use<'a> {
14971497
let document_to_viewport = self.navigation_handler.calculate_offset_transform(ipp.viewport_bounds.center(), &self.document_ptz);
14981498
viewport_polygon.apply_transform(document_to_viewport.inverse());
14991499

15001500
ClickXRayIter::new(&self.network_interface, XRayTarget::Polygon(viewport_polygon))
15011501
}
15021502

15031503
/// Runs an intersection test with all layers and a viewport space subpath; ignoring artboards
1504-
pub fn intersect_polygon_no_artboards<'a>(&'a self, viewport_polygon: Subpath<PointId>, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + 'a + use<'a> {
1504+
pub fn intersect_polygon_no_artboards<'a>(&'a self, viewport_polygon: Subpath<PointId>, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + use<'a> {
15051505
self.intersect_polygon(viewport_polygon, ipp).filter(|layer| !self.network_interface.is_artboard(&layer.to_node(), &[]))
15061506
}
15071507

@@ -1545,7 +1545,7 @@ impl DocumentMessageHandler {
15451545
}
15461546

15471547
/// Find all of the layers that were clicked on from a viewport space location
1548-
pub fn click_xray(&self, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + '_ + use<'_> {
1548+
pub fn click_xray(&self, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + use<'_> {
15491549
let document_to_viewport = self.navigation_handler.calculate_offset_transform(ipp.viewport_bounds.center(), &self.document_ptz);
15501550
let point = document_to_viewport.inverse().transform_point2(ipp.mouse.position);
15511551
ClickXRayIter::new(&self.network_interface, XRayTarget::Point(point))
@@ -1567,7 +1567,7 @@ impl DocumentMessageHandler {
15671567
}
15681568

15691569
/// Find layers under the location in viewport space that was clicked, listed by their depth in the layer tree hierarchy.
1570-
pub fn click_list<'a>(&'a self, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + 'a + use<'a> {
1570+
pub fn click_list<'a>(&'a self, ipp: &InputPreprocessorMessageHandler) -> impl Iterator<Item = LayerNodeIdentifier> + use<'a> {
15711571
self.click_xray(ipp)
15721572
.filter(move |&layer| !self.network_interface.is_artboard(&layer.to_node(), &[]))
15731573
.skip_while(|&layer| layer == LayerNodeIdentifier::ROOT_PARENT)

editor/src/messages/portfolio/document/graph_operation/transform_utils.rs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,35 +72,24 @@ impl LayerBounds {
7272

7373
/// Get the current affine transform from the transform node's inputs
7474
pub fn get_current_transform(inputs: &[NodeInput]) -> DAffine2 {
75-
let translation = match inputs[1].as_value() {
76-
Some(&TaggedValue::DVec2(translation)) => translation,
77-
_ => DVec2::ZERO,
75+
let translation = if let Some(&TaggedValue::DVec2(translation)) = inputs[1].as_value() {
76+
translation
77+
} else {
78+
DVec2::ZERO
7879
};
7980

80-
let angle = match inputs[2].as_value() {
81-
Some(&TaggedValue::F64(angle)) => angle,
82-
_ => 0.,
83-
};
81+
let angle = if let Some(&TaggedValue::F64(angle)) = inputs[2].as_value() { angle } else { 0. };
8482

85-
let scale = match inputs[3].as_value() {
86-
Some(&TaggedValue::DVec2(scale)) => scale,
87-
_ => DVec2::ONE,
88-
};
83+
let scale = if let Some(&TaggedValue::DVec2(scale)) = inputs[3].as_value() { scale } else { DVec2::ONE };
8984

90-
let shear = match inputs[4].as_value() {
91-
Some(&TaggedValue::DVec2(shear)) => shear,
92-
_ => DVec2::ZERO,
93-
};
85+
let shear = if let Some(&TaggedValue::DVec2(shear)) = inputs[4].as_value() { shear } else { DVec2::ZERO };
9486

9587
DAffine2::from_scale_angle_translation(scale, angle, translation) * DAffine2::from_cols_array(&[1., shear.y, shear.x, 1., 0., 0.])
9688
}
9789

9890
/// Extract the current normalized pivot from the layer
9991
pub fn get_current_normalized_pivot(inputs: &[NodeInput]) -> DVec2 {
100-
match inputs[5].as_value() {
101-
Some(&TaggedValue::DVec2(pivot)) => pivot,
102-
_ => DVec2::splat(0.5),
103-
}
92+
if let Some(&TaggedValue::DVec2(pivot)) = inputs[5].as_value() { pivot } else { DVec2::splat(0.5) }
10493
}
10594

10695
/// ![](https://files.keavon.com/-/OptimisticSpotlessTinamou/capture.png)

editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,13 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphHandlerData<'a>> for NodeGrap
326326
log::error!("Could not find input {input_index} in NodeGraphMessage::ExposeInput");
327327
return;
328328
};
329-
match &mut input {
330-
NodeInput::Value { exposed, .. } => {
331-
*exposed = new_exposed;
332-
}
333-
_ => {
334-
if !new_exposed {
335-
// If hiding an input that is not a value, then disconnect it. This will convert it to a value input.
336-
responses.add(NodeGraphMessage::DisconnectInput { input_connector });
337-
responses.add(NodeGraphMessage::ExposeInput { input_connector, new_exposed });
338-
return;
339-
}
340-
}
329+
if let NodeInput::Value { exposed, .. } = &mut input {
330+
*exposed = new_exposed;
331+
} else if !new_exposed {
332+
// If hiding an input that is not a value, then disconnect it. This will convert it to a value input.
333+
responses.add(NodeGraphMessage::DisconnectInput { input_connector });
334+
responses.add(NodeGraphMessage::ExposeInput { input_connector, new_exposed });
335+
return;
341336
}
342337

343338
responses.add(DocumentMessage::AddTransaction);

editor/src/messages/portfolio/document/node_graph/node_properties.rs

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ pub fn bool_widget(document_node: &DocumentNode, node_id: NodeId, index: usize,
320320
log::warn!("A widget failed to be built because its node's input index is invalid.");
321321
return vec![];
322322
};
323-
if let &Some(&TaggedValue::Bool(x)) = &input.as_non_exposed_value() {
323+
if let Some(&TaggedValue::Bool(x)) = input.as_non_exposed_value() {
324324
widgets.extend_from_slice(&[
325325
Separator::new(SeparatorType::Unrelated).widget_holder(),
326326
checkbox_input
@@ -349,7 +349,7 @@ pub fn footprint_widget(document_node: &DocumentNode, node_id: NodeId, index: us
349349
log::warn!("A widget failed to be built because its node's input index is invalid.");
350350
return vec![];
351351
};
352-
if let &Some(&TaggedValue::Footprint(footprint)) = &input.as_non_exposed_value() {
352+
if let Some(&TaggedValue::Footprint(footprint)) = input.as_non_exposed_value() {
353353
let top_left = footprint.transform.transform_point2(DVec2::ZERO);
354354
let bounds = footprint.scale();
355355
let oversample = footprint.resolution.as_dvec2() / bounds;
@@ -759,7 +759,7 @@ pub fn color_channel(document_node: &DocumentNode, node_id: NodeId, index: usize
759759
log::warn!("A widget failed to be built because its node's input index is invalid.");
760760
return LayoutGroup::Row { widgets: vec![] };
761761
};
762-
if let &Some(&TaggedValue::RedGreenBlue(mode)) = &input.as_non_exposed_value() {
762+
if let Some(&TaggedValue::RedGreenBlue(mode)) = input.as_non_exposed_value() {
763763
let calculation_modes = [RedGreenBlue::Red, RedGreenBlue::Green, RedGreenBlue::Blue];
764764
let mut entries = Vec::with_capacity(calculation_modes.len());
765765
for method in calculation_modes {
@@ -786,7 +786,7 @@ pub fn rgba_channel(document_node: &DocumentNode, node_id: NodeId, index: usize,
786786
log::warn!("A widget failed to be built because its node's input index is invalid.");
787787
return LayoutGroup::Row { widgets: vec![] };
788788
};
789-
if let &Some(&TaggedValue::RedGreenBlueAlpha(mode)) = &input.as_non_exposed_value() {
789+
if let Some(&TaggedValue::RedGreenBlueAlpha(mode)) = input.as_non_exposed_value() {
790790
let calculation_modes = [RedGreenBlueAlpha::Red, RedGreenBlueAlpha::Green, RedGreenBlueAlpha::Blue, RedGreenBlueAlpha::Alpha];
791791
let mut entries = Vec::with_capacity(calculation_modes.len());
792792
for method in calculation_modes {
@@ -814,7 +814,7 @@ pub fn noise_type(document_node: &DocumentNode, node_id: NodeId, index: usize, n
814814
log::warn!("A widget failed to be built because its node's input index is invalid.");
815815
return LayoutGroup::Row { widgets: vec![] };
816816
};
817-
if let &Some(&TaggedValue::NoiseType(noise_type)) = &input.as_non_exposed_value() {
817+
if let Some(&TaggedValue::NoiseType(noise_type)) = input.as_non_exposed_value() {
818818
let entries = NoiseType::list()
819819
.iter()
820820
.map(|noise_type| {
@@ -840,7 +840,7 @@ pub fn fractal_type(document_node: &DocumentNode, node_id: NodeId, index: usize,
840840
log::warn!("A widget failed to be built because its node's input index is invalid.");
841841
return LayoutGroup::Row { widgets: vec![] };
842842
};
843-
if let &Some(&TaggedValue::FractalType(fractal_type)) = &input.as_non_exposed_value() {
843+
if let Some(&TaggedValue::FractalType(fractal_type)) = input.as_non_exposed_value() {
844844
let entries = FractalType::list()
845845
.iter()
846846
.map(|fractal_type| {
@@ -866,7 +866,7 @@ pub fn cellular_distance_function(document_node: &DocumentNode, node_id: NodeId,
866866
log::warn!("A widget failed to be built because its node's input index is invalid.");
867867
return LayoutGroup::Row { widgets: vec![] };
868868
};
869-
if let &Some(&TaggedValue::CellularDistanceFunction(cellular_distance_function)) = &input.as_non_exposed_value() {
869+
if let Some(&TaggedValue::CellularDistanceFunction(cellular_distance_function)) = input.as_non_exposed_value() {
870870
let entries = CellularDistanceFunction::list()
871871
.iter()
872872
.map(|cellular_distance_function| {
@@ -895,7 +895,7 @@ pub fn cellular_return_type(document_node: &DocumentNode, node_id: NodeId, index
895895
log::warn!("A widget failed to be built because its node's input index is invalid.");
896896
return LayoutGroup::Row { widgets: vec![] };
897897
};
898-
if let &Some(&TaggedValue::CellularReturnType(cellular_return_type)) = &input.as_non_exposed_value() {
898+
if let Some(&TaggedValue::CellularReturnType(cellular_return_type)) = input.as_non_exposed_value() {
899899
let entries = CellularReturnType::list()
900900
.iter()
901901
.map(|cellular_return_type| {
@@ -921,7 +921,7 @@ pub fn domain_warp_type(document_node: &DocumentNode, node_id: NodeId, index: us
921921
log::warn!("A widget failed to be built because its node's input index is invalid.");
922922
return LayoutGroup::Row { widgets: vec![] };
923923
};
924-
if let &Some(&TaggedValue::DomainWarpType(domain_warp_type)) = &input.as_non_exposed_value() {
924+
if let Some(&TaggedValue::DomainWarpType(domain_warp_type)) = input.as_non_exposed_value() {
925925
let entries = DomainWarpType::list()
926926
.iter()
927927
.map(|domain_warp_type| {
@@ -947,7 +947,7 @@ pub fn blend_mode(document_node: &DocumentNode, node_id: NodeId, index: usize, n
947947
log::warn!("A widget failed to be built because its node's input index is invalid.");
948948
return LayoutGroup::Row { widgets: vec![] };
949949
};
950-
if let &Some(&TaggedValue::BlendMode(blend_mode)) = &input.as_non_exposed_value() {
950+
if let Some(&TaggedValue::BlendMode(blend_mode)) = input.as_non_exposed_value() {
951951
let entries = BlendMode::list_svg_subset()
952952
.iter()
953953
.map(|category| {
@@ -980,7 +980,7 @@ pub fn luminance_calculation(document_node: &DocumentNode, node_id: NodeId, inde
980980
log::warn!("A widget failed to be built because its node's input index is invalid.");
981981
return LayoutGroup::Row { widgets: vec![] };
982982
};
983-
if let &Some(&TaggedValue::LuminanceCalculation(calculation)) = &input.as_non_exposed_value() {
983+
if let Some(&TaggedValue::LuminanceCalculation(calculation)) = input.as_non_exposed_value() {
984984
let calculation_modes = LuminanceCalculation::list();
985985
let mut entries = Vec::with_capacity(calculation_modes.len());
986986
for method in calculation_modes {
@@ -1008,7 +1008,7 @@ pub fn boolean_operation_radio_buttons(document_node: &DocumentNode, node_id: No
10081008
log::warn!("A widget failed to be built because its node's input index is invalid.");
10091009
return LayoutGroup::Row { widgets: vec![] };
10101010
};
1011-
if let &Some(&TaggedValue::BooleanOperation(calculation)) = &input.as_non_exposed_value() {
1011+
if let Some(&TaggedValue::BooleanOperation(calculation)) = input.as_non_exposed_value() {
10121012
let operations = BooleanOperation::list();
10131013
let icons = BooleanOperation::icons();
10141014
let mut entries = Vec::with_capacity(operations.len());
@@ -1037,7 +1037,7 @@ pub fn line_cap_widget(document_node: &DocumentNode, node_id: NodeId, index: usi
10371037
log::warn!("A widget failed to be built because its node's input index is invalid.");
10381038
return LayoutGroup::Row { widgets: vec![] };
10391039
};
1040-
if let &Some(&TaggedValue::LineCap(line_cap)) = &input.as_non_exposed_value() {
1040+
if let Some(&TaggedValue::LineCap(line_cap)) = input.as_non_exposed_value() {
10411041
let entries = [("Butt", LineCap::Butt), ("Round", LineCap::Round), ("Square", LineCap::Square)]
10421042
.into_iter()
10431043
.map(|(name, val)| {
@@ -1062,7 +1062,7 @@ pub fn line_join_widget(document_node: &DocumentNode, node_id: NodeId, index: us
10621062
log::warn!("A widget failed to be built because its node's input index is invalid.");
10631063
return LayoutGroup::Row { widgets: vec![] };
10641064
};
1065-
if let &Some(&TaggedValue::LineJoin(line_join)) = &input.as_non_exposed_value() {
1065+
if let Some(&TaggedValue::LineJoin(line_join)) = input.as_non_exposed_value() {
10661066
let entries = [("Miter", LineJoin::Miter), ("Bevel", LineJoin::Bevel), ("Round", LineJoin::Round)]
10671067
.into_iter()
10681068
.map(|(name, val)| {
@@ -1150,7 +1150,7 @@ pub fn centroid_widget(document_node: &DocumentNode, node_id: NodeId, index: usi
11501150
log::warn!("A widget failed to be built because its node's input index is invalid.");
11511151
return LayoutGroup::Row { widgets: vec![] };
11521152
};
1153-
if let &Some(&TaggedValue::CentroidType(centroid_type)) = &input.as_non_exposed_value() {
1153+
if let Some(&TaggedValue::CentroidType(centroid_type)) = input.as_non_exposed_value() {
11541154
let entries = vec![
11551155
RadioEntryData::new("area")
11561156
.label("Area")
@@ -1230,8 +1230,8 @@ pub fn query_assign_colors_randomize(node_id: NodeId, context: &NodePropertiesCo
12301230
let document_node = get_document_node(node_id, context)?;
12311231
// This is safe since the node is a proto node and the implementation cannot be changed.
12321232
let randomize_index = 5;
1233-
Ok(match &document_node.inputs.get(randomize_index).and_then(|input| input.as_value()) {
1234-
&Some(&TaggedValue::Bool(randomize_enabled)) => randomize_enabled,
1233+
Ok(match document_node.inputs.get(randomize_index).and_then(|input| input.as_value()) {
1234+
Some(TaggedValue::Bool(randomize_enabled)) => *randomize_enabled,
12351235
_ => false,
12361236
})
12371237
}
@@ -1248,8 +1248,8 @@ pub(crate) fn channel_mixer_properties(node_id: NodeId, context: &mut NodeProper
12481248
// Monochrome
12491249
let monochrome_index = 1;
12501250
let monochrome = bool_widget(document_node, node_id, monochrome_index, "Monochrome", CheckboxInput::default(), true);
1251-
let is_monochrome = match &document_node.inputs[monochrome_index].as_value() {
1252-
&Some(&TaggedValue::Bool(monochrome_choice)) => monochrome_choice,
1251+
let is_monochrome = match document_node.inputs[monochrome_index].as_value() {
1252+
Some(TaggedValue::Bool(monochrome_choice)) => *monochrome_choice,
12531253
_ => false,
12541254
};
12551255

@@ -1281,7 +1281,7 @@ pub(crate) fn channel_mixer_properties(node_id: NodeId, context: &mut NodeProper
12811281
};
12821282

12831283
let is_output_channel = match &document_node.inputs[output_channel_index].as_value() {
1284-
&Some(&TaggedValue::RedGreenBlue(choice)) => choice,
1284+
Some(TaggedValue::RedGreenBlue(choice)) => choice,
12851285
_ => {
12861286
warn!("Channel Mixer node properties panel could not be displayed.");
12871287
return vec![];
@@ -1381,7 +1381,7 @@ pub(crate) fn selective_color_properties(node_id: NodeId, context: &mut NodeProp
13811381
}
13821382

13831383
let colors_choice_index = match &document_node.inputs[colors_index].as_value() {
1384-
&Some(&TaggedValue::SelectiveColorChoice(choice)) => choice,
1384+
Some(TaggedValue::SelectiveColorChoice(choice)) => choice,
13851385
_ => {
13861386
warn!("Selective Color node properties panel could not be displayed.");
13871387
return vec![];
@@ -1414,7 +1414,7 @@ pub(crate) fn selective_color_properties(node_id: NodeId, context: &mut NodeProp
14141414
log::warn!("A widget failed to be built because its node's input index is invalid.");
14151415
return vec![];
14161416
};
1417-
if let &Some(&TaggedValue::RelativeAbsolute(relative_or_absolute)) = &input.as_non_exposed_value() {
1417+
if let Some(&TaggedValue::RelativeAbsolute(relative_or_absolute)) = input.as_non_exposed_value() {
14181418
let entries = vec![
14191419
RadioEntryData::new("relative")
14201420
.label("Relative")
@@ -1500,7 +1500,7 @@ pub(crate) fn rectangle_properties(node_id: NodeId, context: &mut NodeProperties
15001500
log::warn!("A widget failed to be built because its node's input index is invalid.");
15011501
return vec![];
15021502
};
1503-
if let &Some(&TaggedValue::Bool(is_individual)) = &input.as_non_exposed_value() {
1503+
if let Some(&TaggedValue::Bool(is_individual)) = input.as_non_exposed_value() {
15041504
// Values
15051505
let Some(input) = document_node.inputs.get(corner_radius_index) else {
15061506
log::warn!("A widget failed to be built because its node's input index is invalid.");
@@ -2221,15 +2221,14 @@ pub(crate) fn fill_properties(node_id: NodeId, context: &mut NodePropertiesConte
22212221

22222222
let mut widgets_first_row = start_widgets(document_node, node_id, fill_index, "Fill", FrontendGraphDataType::General, true);
22232223

2224-
let (fill, backup_color, backup_gradient) = match (
2224+
let (fill, backup_color, backup_gradient) = if let (Some(TaggedValue::Fill(fill)), &Some(&TaggedValue::OptionalColor(backup_color)), Some(TaggedValue::Gradient(backup_gradient))) = (
22252225
&document_node.inputs[fill_index].as_value(),
22262226
&document_node.inputs[backup_color_index].as_value(),
22272227
&document_node.inputs[backup_gradient_index].as_value(),
22282228
) {
2229-
(&Some(TaggedValue::Fill(fill)), &Some(&TaggedValue::OptionalColor(backup_color)), &Some(TaggedValue::Gradient(backup_gradient))) => (fill, backup_color, backup_gradient),
2230-
_ => {
2231-
return vec![LayoutGroup::Row { widgets: widgets_first_row }];
2232-
}
2229+
(fill, backup_color, backup_gradient)
2230+
} else {
2231+
return vec![LayoutGroup::Row { widgets: widgets_first_row }];
22332232
};
22342233
let fill2 = fill.clone();
22352234
let backup_color_fill: Fill = backup_color.into();

0 commit comments

Comments
 (0)