From 3b182da8bc1d40d734832ae571f11b01adb63616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aki=20V=C3=A4nttinen?= Date: Sun, 22 Mar 2020 12:01:14 +0200 Subject: [PATCH] formatting --- rustfmt.toml | 3 ++- src/path_find/rectangle.rs | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index d200ddc..668e86b 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -2,4 +2,5 @@ max_width = 120 newline_style = "Unix" fn_single_line = true indent_style = "Visual" -use_small_heuristics = "Off" \ No newline at end of file +use_small_heuristics = "Off" +struct_lit_single_line = true \ No newline at end of file diff --git a/src/path_find/rectangle.rs b/src/path_find/rectangle.rs index d86dbcd..2fb11bd 100644 --- a/src/path_find/rectangle.rs +++ b/src/path_find/rectangle.rs @@ -9,13 +9,6 @@ pub struct Rectangle { } impl Rectangle { - fn new(x: usize, y: usize, x_end: usize, y_end: usize) -> Rectangle { - Rectangle { x, - y, - x_end, - y_end } - } - pub fn init_from_center(center: (f32, f32), size: (usize, usize), width: usize, height: usize) -> Rectangle { let pos_x: usize = center.0 as usize; let pos_y: usize = center.1 as usize;