From 2b72fb7610485c4cdba62feb3b2456a8189a1dce Mon Sep 17 00:00:00 2001 From: Chris Bowers Date: Sat, 16 Dec 2023 14:14:57 -0500 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=8E=A8=20Run=20cargo=20format=20?= =?UTF-8?q?on=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f66fd1d..25e4641 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -509,7 +509,11 @@ impl Grid { /// Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used. #[inline] #[must_use] - pub unsafe fn get_unchecked_mut(&mut self, row: impl Into, col: impl Into) -> &mut T { + pub unsafe fn get_unchecked_mut( + &mut self, + row: impl Into, + col: impl Into, + ) -> &mut T { let index = self.get_index(row.into(), col.into()); self.data.get_unchecked_mut(index) } @@ -530,7 +534,11 @@ impl Grid { /// Mutable access to a certain element in the grid. /// Returns `None` if an element beyond the grid bounds is tried to be accessed. #[must_use] - pub fn get_mut(&mut self, row: impl TryInto, col: impl TryInto) -> Option<&mut T> { + pub fn get_mut( + &mut self, + row: impl TryInto, + col: impl TryInto, + ) -> Option<&mut T> { let row_usize = row.try_into().ok()?; let col_usize = col.try_into().ok()?; if row_usize < self.rows && col_usize < self.cols {