diff --git a/hlua/src/lua_tables.rs b/hlua/src/lua_tables.rs index 0374d54..a3f0f14 100644 --- a/hlua/src/lua_tables.rs +++ b/hlua/src/lua_tables.rs @@ -245,7 +245,7 @@ impl<'lua, L> LuaTable assert_eq!(pushed.size, 1); pushed.forget() } - Err((err, lua)) => { + Err((err, _)) => { return Err(CheckedSetError::ValuePushError(err)); } }; @@ -625,7 +625,7 @@ mod tests { fn registry_metatable() { let mut lua = Lua::new(); - let mut registry = LuaTable::registry(&mut lua); + let registry = LuaTable::registry(&mut lua); let mut metatable = registry.get_or_create_metatable(); metatable.set(3, "hello"); } diff --git a/hlua/src/rust_tables.rs b/hlua/src/rust_tables.rs index d867c1d..5859427 100644 --- a/hlua/src/rust_tables.rs +++ b/hlua/src/rust_tables.rs @@ -5,7 +5,6 @@ use PushGuard; use PushOne; use AsMutLua; use TuplePushError; -use Void; use std::collections::{HashMap, HashSet}; use std::hash::Hash; @@ -23,7 +22,7 @@ fn push_iter<'lua, L, V, I, E>(mut lua: L, iterator: I) -> Result, for (elem, index) in iterator.zip((1..)) { let size = match elem.push_to_lua(&mut lua) { Ok(pushed) => pushed.forget(), - Err((err, lua)) => panic!(), // TODO: wrong return Err((err, lua)), // FIXME: destroy the temporary table + Err((_err, _lua)) => panic!(), // TODO: wrong return Err((err, lua)), // FIXME: destroy the temporary table }; match size { @@ -64,7 +63,7 @@ fn push_rec_iter<'lua, L, V, I, E>(mut lua: L, iterator: I) -> Result pushed.forget(), - Err((err, lua)) => panic!(), // TODO: wrong return Err((err, lua)), // FIXME: destroy the temporary table + Err((_err, _lua)) => panic!(), // TODO: wrong return Err((err, lua)), // FIXME: destroy the temporary table }; match size { @@ -154,7 +153,7 @@ impl<'lua, L, K, E> Push for HashSet match push_rec_iter(lua, self.into_iter().zip(iter::repeat(true))) { Ok(g) => Ok(g), Err((TuplePushError::First(err), lua)) => Err((err, lua)), - Err((TuplePushError::Other(_), lua)) => unreachable!(), + Err((TuplePushError::Other(_), _)) => unreachable!(), } } }