@@ -2,9 +2,9 @@ use std::result::Result as StdResult;
2
2
use std:: sync:: Arc ;
3
3
4
4
use mlua:: {
5
- AnyUserData , Error as LuaError , ExternalResult , Function , Integer as LuaInteger , IntoLuaMulti , Lua ,
6
- LuaSerdeExt , MetaMethod , MultiValue , Result , SerializeOptions , String as LuaString , Table , UserData ,
7
- UserDataMethods , UserDataRefMut , Value ,
5
+ AnyUserData , Error as LuaError , Function , Integer as LuaInteger , IntoLuaMulti , Lua , LuaSerdeExt ,
6
+ MetaMethod , MultiValue , Result , SerializeOptions , String as LuaString , Table , UserData , UserDataMethods ,
7
+ UserDataRefMut , Value ,
8
8
} ;
9
9
use ouroboros:: self_referencing;
10
10
use serde:: { Serialize , Serializer } ;
@@ -195,12 +195,12 @@ fn decode(lua: &Lua, (data, opts): (StringOrBytes, Option<Table>)) -> Result<Std
195
195
options = options. set_array_metatable ( enabled) ;
196
196
}
197
197
198
- let json: serde_json:: Value = lua_try ! ( serde_json:: from_slice( & data. as_bytes_deref( ) ) . into_lua_err ( ) ) ;
198
+ let json: serde_json:: Value = lua_try ! ( serde_json:: from_slice( & data. as_bytes_deref( ) ) ) ;
199
199
Ok ( Ok ( lua. to_value_with ( & json, options) ?) )
200
200
}
201
201
202
202
fn decode_native ( lua : & Lua , data : StringOrBytes ) -> Result < StdResult < Value , String > > {
203
- let json: serde_json:: Value = lua_try ! ( serde_json:: from_slice( & data. as_bytes_deref( ) ) . into_lua_err ( ) ) ;
203
+ let json: serde_json:: Value = lua_try ! ( serde_json:: from_slice( & data. as_bytes_deref( ) ) ) ;
204
204
Ok ( Ok ( lua_try ! ( JsonObject :: from( json) . into_lua( lua) ) ) )
205
205
}
206
206
0 commit comments