Merge pull request #1279 from waywardmonkeys/clippy-less-lazy
clippy: Don't need lazy eval for len calls.
This commit is contained in:
commit
f404bcbd6d
|
@ -226,7 +226,7 @@ where
|
||||||
SB: RawStorage<T, Const<1>, C>,
|
SB: RawStorage<T, Const<1>, C>,
|
||||||
{
|
{
|
||||||
assert!(!rows.is_empty(), "At least one row must be given.");
|
assert!(!rows.is_empty(), "At least one row must be given.");
|
||||||
let nrows = R::try_to_usize().unwrap_or_else(|| rows.len());
|
let nrows = R::try_to_usize().unwrap_or(rows.len());
|
||||||
let ncols = rows[0].len();
|
let ncols = rows[0].len();
|
||||||
assert!(
|
assert!(
|
||||||
rows.len() == nrows,
|
rows.len() == nrows,
|
||||||
|
@ -268,7 +268,7 @@ where
|
||||||
SB: RawStorage<T, R>,
|
SB: RawStorage<T, R>,
|
||||||
{
|
{
|
||||||
assert!(!columns.is_empty(), "At least one column must be given.");
|
assert!(!columns.is_empty(), "At least one column must be given.");
|
||||||
let ncols = C::try_to_usize().unwrap_or_else(|| columns.len());
|
let ncols = C::try_to_usize().unwrap_or(columns.len());
|
||||||
let nrows = columns[0].len();
|
let nrows = columns[0].len();
|
||||||
assert!(
|
assert!(
|
||||||
columns.len() == ncols,
|
columns.len() == ncols,
|
||||||
|
|
Loading…
Reference in New Issue