google-cloud-rs
google-cloud-rs copied to clipboard
Deserialize Bucket retention policy from String to u64
Currently when a bucket has retention policy enabled and we try to get the bucket it fails when deserializing it. Google Storage API is sending a String when a u64 is expected based on their documentation.
This PR creates a specific deserializer for u64 when a String or 64 is being sent. I tried to find an existing crate which already solves this but couldn't find anything. However, as this is pretty simple to solve I thought I would just add the code in a new module and if in the future there's a well maintained crate to solve this kind of issues, then it will be pretty straightforward to refactor.