summaryrefslogtreecommitdiff
path: root/src/lua.rs
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2018-03-12 20:33:55 -0400
committerkyren <kerriganw@gmail.com>2018-03-12 20:36:39 -0400
commit1019ab8a3f3260a3db4a65958103647739e0d5e8 (patch)
tree4f4b1f865e6b9b26650947b8c68bb073505062fa /src/lua.rs
parentc252668ba6607ff2e496ca94990a2216eb136db8 (diff)
downloadmlua-1019ab8a3f3260a3db4a65958103647739e0d5e8.zip
Use rlua_ asserts instead of unreachable!, changelog updates for 0.14
0.14 will be released alongside `failure` 1.0 with a dependency update.
Diffstat (limited to 'src/lua.rs')
-rw-r--r--src/lua.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lua.rs b/src/lua.rs
index c021532..da6abbb 100644
--- a/src/lua.rs
+++ b/src/lua.rs
@@ -721,7 +721,7 @@ impl Lua {
ffi::LUA_TTHREAD => Value::Thread(Thread(self.pop_ref())),
- _ => unreachable!("internal error: LUA_TNONE in pop_value"),
+ _ => rlua_panic!("LUA_TNONE in pop_value"),
}
}
@@ -1157,8 +1157,7 @@ impl Lua {
let mut args = MultiValue::new();
args.reserve(stack_nargs as usize);
- // First, convert all of the reference types in the ref stack area into LuaRef types
- // in-place.
+ // Convert all of the reference types in the ref stack area into LuaRef types in-place.
for i in 0..stack_nargs {
let n = stack_nargs - i;
@@ -1215,7 +1214,7 @@ impl Lua {
args.push_front(Value::Thread(Thread(make_ref())));
}
- _ => unreachable!("internal error: LUA_TNONE in pop_value"),
+ _ => rlua_panic!("LUA_TNONE in setup_callback_stack_slots"),
}
}
@@ -1232,7 +1231,6 @@ impl Lua {
extra_args.push(self.pop_value());
}
extra_args.extend(args.into_vec_rev());
-
MultiValue::from_vec_rev(extra_args)
} else {
args