Closed Hexilee closed 4 years ago
Thanks for that! Can we remove the changes to 'static for now as it is a breaking change and only have the CoW + into_static? That would make it easier to use without a breaking change I think?
Of course, I reverted it.
Excuse me, but, can we merge this PR and publish a new version as soon as possible? I really need it.
@MayaWolf and @tjwilson90 would this PR work for you?
Yes, this looks good.
I went for a different approach in my fork, where the DecodingKey and EncodingKey construction methods consume/move their parameters, which I think is the most versatile option - but that would be a breaking change, so if you're interested it's probably better to hold off until a major version bump.
I think I prefer the approach of @Hexilee on that, making things Cow instead of owned so we don't need to clone when we can avoid it. That will be a change for the next version whenever it happens.
I ran into #120 as well, so did a little changes.