media-io / yaserde

Yet Another Serializer/Deserializer
MIT License
174 stars 58 forks source link

Clippy: &str to string #142

Closed Byter09 closed 2 years ago

Byter09 commented 2 years ago

The YaDeserialize macro uses to_string() somewhere and it causes our clippy to blow up.

error: `to_string()` called on a `&str`
  --> model/src/lib.rs:26:28
   |
26 | #[derive(PartialEq, Debug, YaDeserialize)]
   |                            ^^^^^^^^^^^^^
   |
   = help: consider using `.to_owned()`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
   = note: this error originates in the derive macro `YaDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

Thanks for yaserde btw, basically the only solution that works for us so far. :)