diff --git a/src/algorithm/mod.rs b/src/algorithm/mod.rs
index fe8136996..52186648c 100644
--- a/src/algorithm/mod.rs
+++ b/src/algorithm/mod.rs
@@ -136,7 +136,7 @@ impl FillContext for (&CodeSpan, &Inputs) {
}
pub(crate) fn shape_prefixes_match(a: &[usize], b: &[usize]) -> bool {
- a.iter().zip(b.iter()).all(|(a, b)| a == b)
+ a.iter().zip(b).all(|(a, b)| a == b)
}
pub(crate) fn fill_array_shapes(
@@ -153,16 +153,13 @@ where
return Ok(());
}
if a.row_count() == 1 && ctx.fill::().is_err() {
- let fixes = a
- .shape
- .iter()
+ let fixes = (a.shape.iter())
.take_while(|&&dim| dim == 1)
.count()
- .min(a.shape.len())
- .min(b.shape.len());
- if (b.shape[fixes..].iter().rev())
+ .min(a.shape.len());
+ if (b.shape.iter().rev())
.zip(a.shape[fixes..].iter().rev())
- .all(|(a, b)| a == b)
+ .all(|(b, a)| b == a)
{
a.shape.drain(..fixes);
for &dim in b.shape[..fixes].iter().rev() {
@@ -171,14 +168,11 @@ where
}
}
if b.row_count() == 1 && ctx.fill::().is_err() {
- let fixes = b
- .shape
- .iter()
+ let fixes = (b.shape.iter())
.take_while(|&&dim| dim == 1)
.count()
- .min(a.shape.len())
.min(b.shape.len());
- if (a.shape[fixes..].iter().rev())
+ if (a.shape.iter().rev())
.zip(b.shape[fixes..].iter().rev())
.all(|(a, b)| a == b)
{
diff --git a/src/compile.rs b/src/compile.rs
index 52571462d..fc24efd49 100644
--- a/src/compile.rs
+++ b/src/compile.rs
@@ -1179,6 +1179,7 @@ code:
}
Ok(())
}
+ #[allow(clippy::collapsible_match)]
fn modified(&mut self, modified: Modified, call: bool) -> UiuaResult {
let op_count = modified.code_operands().count();
@@ -1290,7 +1291,7 @@ code:
if let Modifier::Primitive(prim) = modified.modifier.value {
// Give advice about redundancy
match prim {
- m @ (Primitive::Each | Primitive::Rows) => {
+ m @ Primitive::Each => {
if let [Sp {
value: Word::Primitive(prim),
span,