Simplify return value
This commit is contained in:
1 parent
5ba4100589
commit
5cbabed095
1 file changed
+1
-1
@@ -33,6 +33,6 @@ pub fn deflate(l: &Lua, uncompressed: LuaString) -> LuaResult<MultiValue> {
|
|||||||
let mut compressed = Vec::new();
|
let mut compressed = Vec::new();
|
||||||
match encoder.read_to_end(&mut compressed) {
|
match encoder.read_to_end(&mut compressed) {
|
||||||
Ok(_) => l.create_string(&compressed).unwrap().into_lua_multi(l),
|
Ok(_) => l.create_string(&compressed).unwrap().into_lua_multi(l),
|
||||||
Err(e) => Ok((Value::Nil, e.to_string()).into_lua_multi(l).unwrap()),
|
Err(e) => (Value::Nil, e.to_string()).into_lua_multi(l),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user