mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 21:38:11 +08:00
Fix clippy warnings (#3085)
* Run clippy fix * Clippy v2 * Make const item static * Cargo fmt
This commit is contained in:
@@ -949,7 +949,7 @@ impl NodeNetwork {
|
||||
for (nested_node_id, mut nested_node) in inner_network.nodes.into_iter() {
|
||||
for (nested_input_index, nested_input) in nested_node.clone().inputs.iter().enumerate() {
|
||||
if let NodeInput::Network { import_index, .. } = nested_input {
|
||||
let parent_input = node.inputs.get(*import_index).unwrap_or_else(|| panic!("Import index {} should always exist", import_index));
|
||||
let parent_input = node.inputs.get(*import_index).unwrap_or_else(|| panic!("Import index {import_index} should always exist"));
|
||||
match *parent_input {
|
||||
// If the input to self is a node, connect the corresponding output of the inner network to it
|
||||
NodeInput::Node { node_id, output_index, lambda } => {
|
||||
|
||||
@@ -301,13 +301,13 @@ impl TaggedValue {
|
||||
"MAGENTA" => Color::MAGENTA,
|
||||
"TRANSPARENT" => Color::TRANSPARENT,
|
||||
_ => {
|
||||
log::error!("Invalid default value color constant: {}", input);
|
||||
log::error!("Invalid default value color constant: {input}");
|
||||
return None;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
log::error!("Invalid default value color: {}", input);
|
||||
log::error!("Invalid default value color: {input}");
|
||||
None
|
||||
}
|
||||
|
||||
@@ -327,13 +327,13 @@ impl TaggedValue {
|
||||
"BottomCenter" => ReferencePoint::BottomCenter,
|
||||
"BottomRight" => ReferencePoint::BottomRight,
|
||||
_ => {
|
||||
log::error!("Invalid ReferencePoint default type variant: {}", input);
|
||||
log::error!("Invalid ReferencePoint default type variant: {input}");
|
||||
return None;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
log::error!("Invalid ReferencePoint default type: {}", input);
|
||||
log::error!("Invalid ReferencePoint default type: {input}");
|
||||
None
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user