File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 7
7
- ` Lua::replace_registry_value ` takes ` &mut RegistryKey `
8
8
- ` Lua::scope ` temporary disabled (will be re-added in the next release)
9
9
- Reduced the compile time contribution of ` next_key_seed ` and ` next_value_seed ` .
10
+ - Reduced the compile time contribution of ` serde_userdata ` .
10
11
11
12
## v0.9.9
12
13
Original file line number Diff line number Diff line change @@ -719,6 +719,11 @@ fn serde_userdata<V>(
719
719
ud : AnyUserData ,
720
720
f : impl FnOnce ( serde_value:: Value ) -> std:: result:: Result < V , serde_value:: DeserializerError > ,
721
721
) -> Result < V > {
722
- let value = serde_value:: to_value ( ud) . map_err ( |err| Error :: SerializeError ( err. to_string ( ) ) ) ?;
723
- f ( value) . map_err ( |err| Error :: DeserializeError ( err. to_string ( ) ) )
722
+ match serde_value:: to_value ( ud) {
723
+ Ok ( value) => match f ( value) {
724
+ Ok ( r) => Ok ( r) ,
725
+ Err ( error) => Err ( Error :: DeserializeError ( error. to_string ( ) ) ) ,
726
+ } ,
727
+ Err ( error) => Err ( Error :: SerializeError ( error. to_string ( ) ) ) ,
728
+ }
724
729
}
You can’t perform that action at this time.
0 commit comments