diff options
author | kyren <kerriganw@gmail.com> | 2018-03-12 20:33:55 -0400 |
---|---|---|
committer | kyren <kerriganw@gmail.com> | 2018-03-12 20:36:39 -0400 |
commit | 1019ab8a3f3260a3db4a65958103647739e0d5e8 (patch) | |
tree | 4f4b1f865e6b9b26650947b8c68bb073505062fa /src/lua.rs | |
parent | c252668ba6607ff2e496ca94990a2216eb136db8 (diff) | |
download | mlua-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.rs | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 |