Merge pull request #189 from mkpankov/warnings

Fix warnings
This commit is contained in:
Pierre Krieger 2018-04-20 12:07:36 +02:00 committed by GitHub
commit c1806b72eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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::<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);
}

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
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