Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
983 stars 132 forks source link

Fix base64 deserialization when using a reader #471

Closed ytanay closed 5 months ago

ytanay commented 5 months ago

In our use case, we deserialize GCP structs using a file reader (instead from an in-memory string), which yields errors such as this:

Caused by:
    invalid type: string "...", expected a borrowed string at line ... column ...

The first commit demonstrates this behavior, and the second fixes it by allowing serde to choose between a borrowed and owned string using a Cow.