Fix warnings

master
Michael Pankov 2018-04-19 17:07:02 +03:00
parent 84d5ea4b12
commit f9275ae8ef
2 changed files with 2 additions and 2 deletions

View File

@ -458,7 +458,7 @@ mod tests {
fn args() { fn args() {
let mut lua = Lua::new(); let mut lua = Lua::new();
lua.execute::<()>("function foo(a) return a * 5 end").unwrap(); lua.execute::<()>("function foo(a) return a * 5 end").unwrap();
let val: i32 = lua.get::<LuaFunction<_>, _>("foo").unwrap().call_with_args((3)).unwrap(); let val: i32 = lua.get::<LuaFunction<_>, _>("foo").unwrap().call_with_args(3).unwrap();
assert_eq!(val, 15); assert_eq!(val, 15);
} }

View File

@ -21,7 +21,7 @@ fn push_iter<'lua, L, V, I, E>(mut lua: L, iterator: I) -> Result<PushGuard<L>,
// creating empty table // creating empty table
unsafe { ffi::lua_newtable(lua.as_mut_lua().0) }; 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) { let size = match elem.push_to_lua(&mut lua) {
Ok(pushed) => pushed.forget_internal(), Ok(pushed) => pushed.forget_internal(),
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