Change signature of Function::dump() to remove Result

This commit is contained in:
Alex Orlenko
2021-05-02 11:48:42 +01:00
parent 3f55958bdd
commit e8505b5239
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -187,7 +187,7 @@ impl<'lua> Function<'lua> {
///
/// If `strip` is true, the binary representation may not include all debug information
/// about the function, to save space.
pub fn dump(&self, strip: bool) -> Result<Vec<u8>> {
pub fn dump(&self, strip: bool) -> Vec<u8> {
unsafe extern "C" fn writer(
_state: *mut ffi::lua_State,
buf: *const c_void,
@@ -213,7 +213,7 @@ impl<'lua> Function<'lua> {
ffi::lua_pop(lua.state, 1);
}
Ok(data)
data
}
}