From f9275ae8ef882fb19f0405cd2db15a13b02d027f Mon Sep 17 00:00:00 2001 From: Michael Pankov Date: Thu, 19 Apr 2018 17:07:02 +0300 Subject: [PATCH] Fix warnings --- hlua/src/lua_functions.rs | 2 +- hlua/src/rust_tables.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hlua/src/lua_functions.rs b/hlua/src/lua_functions.rs index 7d38ede..7a101e3 100644 --- a/hlua/src/lua_functions.rs +++ b/hlua/src/lua_functions.rs @@ -458,7 +458,7 @@ mod tests { fn args() { let mut lua = Lua::new(); lua.execute::<()>("function foo(a) return a * 5 end").unwrap(); - let val: i32 = lua.get::, _>("foo").unwrap().call_with_args((3)).unwrap(); + let val: i32 = lua.get::, _>("foo").unwrap().call_with_args(3).unwrap(); assert_eq!(val, 15); } diff --git a/hlua/src/rust_tables.rs b/hlua/src/rust_tables.rs index 5a38f26..77126f8 100644 --- a/hlua/src/rust_tables.rs +++ b/hlua/src/rust_tables.rs @@ -21,7 +21,7 @@ fn push_iter<'lua, L, V, I, E>(mut lua: L, iterator: I) -> Result, // creating empty table unsafe { ffi::lua_newtable(lua.as_mut_lua().0) }; - for (elem, index) in iterator.zip((1..)) { + for (elem, index) in iterator.zip(1..) { let size = match elem.push_to_lua(&mut lua) { Ok(pushed) => pushed.forget_internal(), Err((_err, _lua)) => panic!(), // TODO: wrong return Err((err, lua)), // FIXME: destroy the temporary table