From c8ee957e93888fb5381b7998832e0fd841ed39c9 Mon Sep 17 00:00:00 2001 From: Harrison McCullough Date: Mon, 20 May 2024 21:01:02 -0700 Subject: [PATCH] Rust rustfmt --- src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 21f99d3..e5a472f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -190,7 +190,9 @@ pub enum Error { impl Display for Error { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { match self { - Error::IndicesOutOfBounds(row, column) => write!(f, "indices ({row}, {column}) out of bounds"), + Error::IndicesOutOfBounds(row, column) => { + write!(f, "indices ({row}, {column}) out of bounds") + } Error::IndexOutOfBounds(index) => write!(f, "index {index} out of bounds"), Error::DimensionMismatch => write!(f, "dimension mismatch"), Error::NotEnoughElements => write!(f, "not enough elements"), @@ -875,7 +877,10 @@ impl Array2D { /// ``` /// /// [`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html - pub fn row_iter(&self, row_index: usize) -> Result + Clone, Error> { + pub fn row_iter( + &self, + row_index: usize, + ) -> Result + Clone, Error> { let start = self .get_index(row_index, 0) .ok_or(Error::IndicesOutOfBounds(row_index, 0))?;