mlemesle / rustemon

A wrapper library for PokeApi, written in Rust
MIT License
28 stars 10 forks source link

add Serialize to internal structs #32

Closed GregHanson closed 2 months ago

GregHanson commented 2 months ago

minor change, but could serde::Serialize be included with all PokeAPI structs? I'd like to be able to export the data I retrieve from the library to other tooling/libraries

mlemesle commented 2 months ago

@GregHanson Hey there! Thanks for your contribution, it is much appreciated! Since you're the second one to ask for this feature, I'm willing to accept it. However, I'd prefer if it was behind a feature gate that is opt-out by default

GregHanson commented 2 months ago

done! I think I did that right since my import of the branch compiles

mlemesle commented 2 months ago

Thanks! I'll look into it as soon as possible when I come back from vacations!

mlemesle commented 2 months ago

Hey @GregHanson !

Thanks for the contribution ! I reviewed it, it works and it's a nice addition to the crate, thanks ! You didn't put Serialize on every struct though, is there a reason for that ? Do you mind adding this to all structs that are already Deserialize ? I can merge it as is if you want, and I'll do it myself if you prefer.

Please let me know !

GregHanson commented 2 months ago

you are right! that was my mistake. I think I got them all now

mlemesle commented 2 months ago

Thanks for your contribution ! I'll make a release right away !