Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
DaraghD committed Oct 28, 2024
1 parent dc2e478 commit 5aaae31
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions editor/src/messages/tool/common_functionality/shape_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,15 +1068,15 @@ impl ShapeState {
};

for point in self.selected_points() {
if let Some(_) = point.as_anchor() {
if point.as_anchor().is_some() {
return PointSelectState::Anchor;
}
if let Some(_) = point.get_handle_pair(&vector_data) {
if point.get_handle_pair(&vector_data).is_some() {
return PointSelectState::HandleWithPair;
}
}
}
return PointSelectState::HandleNoPair;
PointSelectState::HandleNoPair
}

/// Returns true if atleast one handle with pair is selected
Expand All @@ -1086,15 +1086,15 @@ impl ShapeState {
continue;
};
for point in self.selected_points() {
if let Some(_) = point.as_anchor() {
if point.as_anchor().is_some() {
return false;
}
if let Some(_) = point.get_handle_pair(&vector_data) {
if point.get_handle_pair(&vector_data).is_some() {
return true;
}
}
}
return false;
false
}

/// Alternate selected handles to mirrors
Expand All @@ -1107,7 +1107,7 @@ impl ShapeState {
};

for point in self.selected_points() {
if let Some(_) = point.as_anchor() {
if point.as_anchor().is_some() {
continue;
}
if let Some(handles) = point.get_handle_pair(&vector_data) {
Expand Down

0 comments on commit 5aaae31

Please sign in to comment.