Add commas after match arms wrapped in blocks
All checks were successful
/ test (pull_request) Successful in 3m29s
All checks were successful
/ test (pull_request) Successful in 3m29s
This commit is contained in:
parent
ebad512a03
commit
bfd5d8e35f
4 changed files with 14 additions and 14 deletions
|
@ -717,14 +717,14 @@ impl Assembly {
|
||||||
|
|
||||||
// save the tangent space
|
// save the tangent space
|
||||||
self.tangent.set_silent(tangent);
|
self.tangent.set_silent(tangent);
|
||||||
}
|
},
|
||||||
Err(message) => {
|
Err(message) => {
|
||||||
// report the realization status. the `Err(message)` we're
|
// report the realization status. the `Err(message)` we're
|
||||||
// setting the status to has a different type than the
|
// setting the status to has a different type than the
|
||||||
// `Err(message)` we received from the match: we're changing the
|
// `Err(message)` we received from the match: we're changing the
|
||||||
// `Ok` type from `Realization` to `()`
|
// `Ok` type from `Realization` to `()`
|
||||||
self.realization_status.set(Err(message))
|
self.realization_status.set(Err(message))
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -804,10 +804,10 @@ impl Assembly {
|
||||||
// restore its normalization
|
// restore its normalization
|
||||||
*rep += motion_proj.column(column_index);
|
*rep += motion_proj.column(column_index);
|
||||||
elt.project_to_normalized(rep);
|
elt.project_to_normalized(rep);
|
||||||
}
|
},
|
||||||
None => {
|
None => {
|
||||||
console_log!("No velocity to unpack for fresh element \"{}\"", elt.id())
|
console_log!("No velocity to unpack for fresh element \"{}\"", elt.id())
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -910,17 +910,17 @@ pub fn Display() -> View {
|
||||||
if depth < best_depth {
|
if depth < best_depth {
|
||||||
clicked = Some((elt, depth))
|
clicked = Some((elt, depth))
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
None => clicked = Some((elt, depth)),
|
None => clicked = Some((elt, depth)),
|
||||||
}
|
},
|
||||||
None => ()
|
None => (),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we clicked something, select it
|
// if we clicked something, select it
|
||||||
match clicked {
|
match clicked {
|
||||||
Some((elt, _)) => state.select(&elt, event.shift_key()),
|
Some((elt, _)) => state.select(&elt, event.shift_key()),
|
||||||
None => state.selection.update(|sel| sel.clear())
|
None => state.selection.update(|sel| sel.clear()),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -67,8 +67,8 @@ fn RegulatorInput(regulator: Rc<dyn Regulator>) -> View {
|
||||||
Ok(set_pt) => {
|
Ok(set_pt) => {
|
||||||
set_point.set(set_pt);
|
set_point.set(set_pt);
|
||||||
true
|
true
|
||||||
}
|
},
|
||||||
Err(_) => false
|
Err(_) => false,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
@ -162,19 +162,19 @@ fn ElementOutlineItem(element: Rc<dyn Element>) -> View {
|
||||||
"Enter" => {
|
"Enter" => {
|
||||||
state.select(&element_for_handler, event.shift_key());
|
state.select(&element_for_handler, event.shift_key());
|
||||||
event.prevent_default();
|
event.prevent_default();
|
||||||
}
|
},
|
||||||
"ArrowRight" if regulated.get() => {
|
"ArrowRight" if regulated.get() => {
|
||||||
let _ = details_node
|
let _ = details_node
|
||||||
.get()
|
.get()
|
||||||
.unchecked_into::<web_sys::Element>()
|
.unchecked_into::<web_sys::Element>()
|
||||||
.set_attribute("open", "");
|
.set_attribute("open", "");
|
||||||
}
|
},
|
||||||
"ArrowLeft" => {
|
"ArrowLeft" => {
|
||||||
let _ = details_node
|
let _ = details_node
|
||||||
.get()
|
.get()
|
||||||
.unchecked_into::<web_sys::Element>()
|
.unchecked_into::<web_sys::Element>()
|
||||||
.remove_attribute("open");
|
.remove_attribute("open");
|
||||||
}
|
},
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,7 +474,7 @@ pub fn realize_gram(
|
||||||
None => return Realization {
|
None => return Realization {
|
||||||
result: Err("Cholesky decomposition failed".to_string()),
|
result: Err("Cholesky decomposition failed".to_string()),
|
||||||
history,
|
history,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
let base_step_stacked = hess_cholesky.solve(&neg_grad_stacked);
|
let base_step_stacked = hess_cholesky.solve(&neg_grad_stacked);
|
||||||
let base_step = base_step_stacked.reshape_generic(Dyn(element_dim), Dyn(assembly_dim));
|
let base_step = base_step_stacked.reshape_generic(Dyn(element_dim), Dyn(assembly_dim));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue