From 4a2207fd076fdb75f8cc7f817c121020b0d81f9a Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Wed, 13 Sep 2023 20:58:56 +0700 Subject: [PATCH] clippy: Fix unnecessary_mut_passed warning. The `ModuleInfo` was not used mutably. --- src/valid/expression.rs | 2 +- src/valid/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/valid/expression.rs b/src/valid/expression.rs index 1d1d6c0b99..f9b77b1297 100644 --- a/src/valid/expression.rs +++ b/src/valid/expression.rs @@ -157,7 +157,7 @@ impl super::Validator { &self, handle: Handle, gctx: crate::proc::GlobalCtx, - mod_info: &mut ModuleInfo, + mod_info: &ModuleInfo, ) -> Result<(), super::ConstExpressionError> { use crate::Expression as E; diff --git a/src/valid/mod.rs b/src/valid/mod.rs index 5351287725..f99a2055ce 100644 --- a/src/valid/mod.rs +++ b/src/valid/mod.rs @@ -400,7 +400,7 @@ impl Validator { #[cfg(feature = "validate")] if self.flags.contains(ValidationFlags::CONSTANTS) { for (handle, _) in module.const_expressions.iter() { - self.validate_const_expression(handle, module.to_ctx(), &mut mod_info) + self.validate_const_expression(handle, module.to_ctx(), &mod_info) .map_err(|source| { ValidationError::ConstExpression { handle, source } .with_span_handle(handle, &module.const_expressions)