Implement more clippy suggestions

This commit is contained in:
Manuel Vögele
2022-01-31 23:31:29 +01:00
parent cd61aa948e
commit 1e14ff24b0
3 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -100,7 +100,9 @@ pub fn free(pathfinder: Pathfinder) {
#[allow(dead_code)]
#[wasm_bindgen(js_name=findPath)]
pub fn find_path(pathfinder: &mut Pathfinder, from: JsPoint, to: JsPoint) -> Option<Array> {
pathfinder.find_path(from.into(), to.into()).map(|first_node| first_node.iter_path().map(JsValue::from).collect())
pathfinder
.find_path(from.into(), to.into())
.map(|first_node| first_node.iter_path().map(JsValue::from).collect())
}
#[allow(dead_code)]