Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bincode::Encode doesn't work with Cow<'a, str> #523

Closed
ajeetdsouza opened this issue Mar 15, 2022 · 1 comment · Fixed by #524
Closed

bincode::Encode doesn't work with Cow<'a, str> #523

ajeetdsouza opened this issue Mar 15, 2022 · 1 comment · Fixed by #524

Comments

@ajeetdsouza
Copy link
Contributor

Consider this struct:

#[derive(Clone, Encode)]
pub struct Foo<'a>(Cow<'a, str>);

The error I get is: the trait 'Clone' is not implemented for 'str'

@VictorKoenders
Copy link
Contributor

Opened up #524 to make the Encode constraints more permissive 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants