Skip to content

Commit

Permalink
Resolve clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonMc555 committed May 21, 2024
1 parent f75060c commit 99da364
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<T> Array2D<T> {
where
T: Clone,
{
let row_len = elements.get(0).map(Vec::len).unwrap_or(0);
let row_len = elements.first().map(Vec::len).unwrap_or(0);
if !elements.iter().all(|row| row.len() == row_len) {
return Err(Error::DimensionMismatch);
}
Expand Down Expand Up @@ -262,7 +262,7 @@ impl<T> Array2D<T> {
where
T: Clone,
{
let column_len = elements.get(0).map(Vec::len).unwrap_or(0);
let column_len = elements.first().map(Vec::len).unwrap_or(0);
if !elements.iter().all(|column| column.len() == column_len) {
return Err(Error::DimensionMismatch);
}
Expand Down

0 comments on commit 99da364

Please sign in to comment.