Skip to content

Commit

Permalink
Format shape
Browse files Browse the repository at this point in the history
I don't think I modified this.

Signed-off-by: Audrow Nash <audrow@intrinsic.ai>
  • Loading branch information
audrow committed Jul 7, 2023
1 parent 05df5ac commit 8b3ab94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rmf_site_editor/src/shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,9 @@ pub(crate) fn make_finite_grid(

let mut polylines: HashMap<u32, Polyline> = HashMap::new();
let mut result = {
let Some(width) = weights.values().last().copied() else { return Vec::new() };
let Some(width) = weights.values().last().copied() else {
return Vec::new();
};
let mut axes: Vec<(Polyline, PolylineMaterial)> = Vec::new();

for (sign, x_axis_color, y_axis_color) in [
Expand Down Expand Up @@ -1304,7 +1306,9 @@ pub(crate) fn make_finite_grid(
for n in 1..=count {
let d = n as f32 * scale;
let polylines = {
let Some(weight_key) = weights.keys().rev().find(|k| n % **k == 0) else { continue };
let Some(weight_key) = weights.keys().rev().find(|k| n % **k == 0) else {
continue;
};
polylines.entry(*weight_key).or_default()
};

Expand Down

0 comments on commit 8b3ab94

Please sign in to comment.