media-io / yaserde

Yet Another Serializer/Deserializer
MIT License
175 stars 57 forks source link

Prevent Yaserde from reading non #[yaserde(...)] attributes #102

Closed ephraimkunz closed 3 years ago

ephraimkunz commented 3 years ago

Closes #101.

As I mentioned in that issue, I'm not sure if the previous behavior of reading any attribute that had the correct string inside was intended or not. Assuming that it wasn't, the solution is to just filter out all non-yaserde attributes.

For reference, serde also filters out other attributes except for the serde attribute: https://github.com/serde-rs/serde/blob/b054ea41053ea4047882cc33970d2257cdfe04ac/serde_derive/src/internals/attr.rs#L1568

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 244


Totals Coverage Status
Change from base Build 242: 0.6%
Covered Lines: 940
Relevant Lines: 1643

💛 - Coveralls