diff --git a/src/lune/builtins/serde/encode_decode.rs b/src/lune/builtins/serde/encode_decode.rs index d8bae5c..8457a25 100644 --- a/src/lune/builtins/serde/encode_decode.rs +++ b/src/lune/builtins/serde/encode_decode.rs @@ -87,11 +87,7 @@ impl EncodeDecodeConfig { lua.create_string(bytes) } - pub fn deserialize_from_string<'lua>( - self, - lua: &'lua Lua, - string: BString, - ) -> LuaResult> { + pub fn deserialize_from_string(self, lua: &Lua, string: BString) -> LuaResult { let bytes = string.as_bytes(); match self.format { EncodeDecodeFormat::Json => { diff --git a/src/lune/builtins/serde/mod.rs b/src/lune/builtins/serde/mod.rs index 910cb59..de351a3 100644 --- a/src/lune/builtins/serde/mod.rs +++ b/src/lune/builtins/serde/mod.rs @@ -26,26 +26,23 @@ fn serde_encode<'lua>( config.serialize_to_string(lua, val) } -fn serde_decode<'lua>( - lua: &'lua Lua, - (format, str): (EncodeDecodeFormat, BString), -) -> LuaResult> { +fn serde_decode(lua: &Lua, (format, str): (EncodeDecodeFormat, BString)) -> LuaResult { let config = EncodeDecodeConfig::from(format); config.deserialize_from_string(lua, str) } -async fn serde_compress<'lua>( - lua: &'lua Lua, +async fn serde_compress( + lua: &Lua, (format, str): (CompressDecompressFormat, BString), -) -> LuaResult> { +) -> LuaResult { let bytes = compress(format, str).await?; lua.create_string(bytes) } -async fn serde_decompress<'lua>( - lua: &'lua Lua, +async fn serde_decompress( + lua: &Lua, (format, str): (CompressDecompressFormat, BString), -) -> LuaResult> { +) -> LuaResult { let bytes = decompress(format, str).await?; lua.create_string(bytes) }