diff --git a/Cargo.toml b/Cargo.toml index 39c12116..a4cf4da8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,12 +21,12 @@ static_assertions = "1.1.0" ariadne = "0.6.0" [workspace.lints.clippy] -unnecessary_semicolon = "deny" -match_wildcard_for_single_variants = "deny" -explicit_iter_loop = "deny" -match_same_arms = "deny" -elidable_lifetime_names = "deny" -trivially_copy_pass_by_ref = "deny" +unnecessary_semicolon = "warn" +match_wildcard_for_single_variants = "warn" +explicit_iter_loop = "warn" +match_same_arms = "warn" +elidable_lifetime_names = "warn" +trivially_copy_pass_by_ref = "warn" [profile.dev.package] insta.opt-level = 3 diff --git a/crates/math-core/src/parser.rs b/crates/math-core/src/parser.rs index 0bae4397..3529385c 100644 --- a/crates/math-core/src/parser.rs +++ b/crates/math-core/src/parser.rs @@ -1780,7 +1780,7 @@ fn middle_stretch_attrs(op: StretchableOp) -> OpAttrs { match op.stretchy { Stretchy::PrePostfix | Stretchy::Never => OpAttrs::STRETCHY_TRUE, Stretchy::AlwaysAsymmetric => OpAttrs::SYMMETRIC_TRUE, - _ => OpAttrs::empty(), + Stretchy::Always => OpAttrs::empty(), } } diff --git a/crates/math-core/src/token_queue.rs b/crates/math-core/src/token_queue.rs index c75bdffe..4841a1ea 100644 --- a/crates/math-core/src/token_queue.rs +++ b/crates/math-core/src/token_queue.rs @@ -35,7 +35,7 @@ impl<'source, 'config> TokenQueue<'source, 'config> { fn load_token_skip_whitespace(&mut self) -> Result> { Ok(self .load_token(is_not_whitespace)? - .unwrap_or_else(|| self.queue.len())) + .unwrap_or(self.queue.len())) } /// Load the next not-skipped token from the lexer into the buffer.