Skip to content

Commit bd53892

Browse files
committed
Cargo clippy
1 parent ebead52 commit bd53892

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

editor/src/messages/tool/common_functionality/shape_editor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ impl ShapeState {
586586
.flat_map(|(data, selection_state)| {
587587
selection_state.selected_points.iter().filter_map(move |&point| {
588588
let Some(data) = &data else { return None };
589-
let Some(_) = point.get_handle_pair(&data) else { return None }; // ignores the endpoints.
589+
let _ = point.get_handle_pair(data)?; // ignores the endpoints.
590590
Some(data.colinear(point))
591591
})
592592
});
@@ -1076,9 +1076,9 @@ impl ShapeState {
10761076
}
10771077
}
10781078
} else if let Some(handles) = point.get_handle_pair(&vector_data) {
1079-
let modification_type = VectorModificationType::SetG1Continuous { handles, enabled: false };
1080-
responses.add(GraphOperationMessage::Vector { layer, modification_type });
1081-
}
1079+
let modification_type = VectorModificationType::SetG1Continuous { handles, enabled: false };
1080+
responses.add(GraphOperationMessage::Vector { layer, modification_type });
1081+
}
10821082
}
10831083
}
10841084
}

editor/src/test_utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::node_graph_executor::Instrumented;
1010
use crate::node_graph_executor::NodeRuntime;
1111

1212
use graph_craft::document::DocumentNode;
13-
use graphene_core::raster::color::Color;
1413
use graphene_core::InputAccessor;
14+
use graphene_core::raster::color::Color;
1515

1616
use glam::DVec2;
1717

@@ -256,7 +256,7 @@ pub mod test_prelude {
256256
pub use crate::messages::portfolio::document::utility_types::clipboards::Clipboard;
257257
pub use crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier;
258258
pub use crate::messages::prelude::*;
259-
pub use crate::messages::tool::common_functionality::graph_modification_utils::{is_layer_fed_by_node_of_name, NodeGraphLayer};
259+
pub use crate::messages::tool::common_functionality::graph_modification_utils::{NodeGraphLayer, is_layer_fed_by_node_of_name};
260260
pub use crate::messages::tool::utility_types::ToolType;
261261
pub use crate::node_graph_executor::NodeRuntime;
262262
pub use crate::test_utils::EditorTestUtils;
@@ -266,7 +266,7 @@ pub mod test_prelude {
266266
pub use graph_craft::document::DocumentNode;
267267
pub use graphene_core::raster::{Color, Image};
268268
pub use graphene_core::{InputAccessor, InputAccessorSource};
269-
pub use graphene_std::{transform::Footprint, GraphicGroup};
269+
pub use graphene_std::{GraphicGroup, transform::Footprint};
270270

271271
#[macro_export]
272272
macro_rules! float_eq {

0 commit comments

Comments
 (0)