From 1f4c4ba87125c9c4a8731edf502e2fe6fbcbd927 Mon Sep 17 00:00:00 2001 From: DrInfy Date: Sat, 29 May 2021 00:46:19 +0300 Subject: [PATCH] minor return fixes --- src/helpers/mod.rs | 4 ++-- src/path_find/mod.rs | 2 +- tests/common.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers/mod.rs b/src/helpers/mod.rs index 0c77b01..3891844 100644 --- a/src/helpers/mod.rs +++ b/src/helpers/mod.rs @@ -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) } diff --git a/src/path_find/mod.rs b/src/path_find/mod.rs index 6983e94..54c59d0 100644 --- a/src/path_find/mod.rs +++ b/src/path_find/mod.rs @@ -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] diff --git a/tests/common.rs b/tests/common.rs index a0d46d0..83cca8e 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -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 }