Fix the warnings
This commit is contained in:
parent
b8112e1436
commit
7a097eddb5
@ -245,7 +245,7 @@ impl<'lua, L> LuaTable<L>
|
||||
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");
|
||||
}
|
||||
|
@ -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<PushGuard<L>,
|
||||
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<PushGuard<
|
||||
for elem in iterator {
|
||||
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 {
|
||||
@ -154,7 +153,7 @@ impl<'lua, L, K, E> Push<L> for HashSet<K>
|
||||
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!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user