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))?;