Clean up and suppress Clippy warnings (#1402)

* fix: clear and suppress clippy warnings

* Simplification

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Prikshit Gautam
2023-08-27 16:56:53 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent e77782aadb
commit fb1922b49d
6 changed files with 36 additions and 52 deletions
@@ -738,11 +738,7 @@ pub fn boolean_properties(document_node: &DocumentNode, node_id: NodeId, _contex
}
pub fn color_properties(document_node: &DocumentNode, node_id: NodeId, _context: &mut NodePropertiesContext) -> Vec<LayoutGroup> {
let operand = |name: &str, index| {
let color = color_widget(document_node, node_id, index, name, ColorInput::default(), true);
color
};
let operand = |name: &str, index| color_widget(document_node, node_id, index, name, ColorInput::default(), true);
vec![operand("Color", 0)]
}
@@ -790,20 +786,12 @@ pub fn mask_properties(document_node: &DocumentNode, node_id: NodeId, _context:
}
pub fn blend_mode_properties(document_node: &DocumentNode, node_id: NodeId, _context: &mut NodePropertiesContext) -> Vec<LayoutGroup> {
let operand = |name: &str, index| {
let blend_mode = blend_mode(document_node, node_id, index, name, true);
blend_mode
};
let operand = |name: &str, index| blend_mode(document_node, node_id, index, name, true);
vec![operand("Blend Mode", 0)]
}
pub fn color_channel_properties(document_node: &DocumentNode, node_id: NodeId, _context: &mut NodePropertiesContext) -> Vec<LayoutGroup> {
let operand = |name: &str, index| {
let color_channel = color_channel(document_node, node_id, index, name, true);
color_channel
};
let operand = |name: &str, index| color_channel(document_node, node_id, index, name, true);
vec![operand("Channel", 0)]
}