Skip to content

Commit

Permalink
minor return fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DrInfy committed May 28, 2021
1 parent f6c556b commit 1f4c4ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/helpers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pub fn round_point2(point: (f32, f32)) -> (usize, usize) {
let x = point.0.round() as usize;
let y = point.1.round() as usize;
return (x, y);
(x, y)
}

pub fn point2_f32(point: (usize, usize)) -> (f32, f32) {
let x = point.0 as f32;
let y = point.1 as f32;
return (x, y);
(x, y)
}
2 changes: 1 addition & 1 deletion src/path_find/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl PathFind {
pub fn lowest_influence_walk(&self, center: (usize, usize), distance: f32) -> ((usize, usize), f32) {
let corrected_center = self.get_closest_pathable(center);

return self.lowest_influence_walk_inline(corrected_center, distance);
self.lowest_influence_walk_inline(corrected_center, distance)
}

#[inline]
Expand Down
2 changes: 1 addition & 1 deletion tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ pub fn get_choke_map() -> Map {
let grid3 = read_vec_from_file("tests/choke.txt");

let map = Map::new(grid, grid2, grid3, 2, 2, 38, 38);
return map;
map
}

0 comments on commit 1f4c4ba

Please sign in to comment.