Skip to content

Commit

Permalink
Merge pull request #24 from HarrisonMc555/clippy
Browse files Browse the repository at this point in the history
Resolve clippy warnings
  • Loading branch information
HarrisonMc555 authored May 21, 2024
2 parents f75060c + 99da364 commit 7866bc6
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 7866bc6

Please sign in to comment.