From f47b911681e835cd83abeb253d30f90b9db2b75a Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 25 Feb 2022 10:03:34 +0800 Subject: [PATCH] Remove warning. --- src/module/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/module/mod.rs b/src/module/mod.rs index 2ba4bf4d..8da2ca55 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -1720,7 +1720,7 @@ impl Module { result?; // Variables with an alias left in the scope become module variables - for (name, value, mut aliases) in scope { + for (_name, value, mut aliases) in scope { // It is an error to export function pointers that refer to encapsulated local functions #[cfg(not(feature = "no_function"))] if let Some(fn_ptr) = value.downcast_ref::() { @@ -1728,12 +1728,12 @@ impl Module { return Err(crate::ERR::ErrorMismatchDataType( "".to_string(), if fn_ptr.is_anonymous() { - format!("cannot export closure in variable {}", name) + format!("cannot export closure in variable {}", _name) } else { format!( "cannot export function pointer to local function '{}' in variable {}", fn_ptr.fn_name(), - name + _name ) }, crate::Position::NONE,