Skip to content

Relax implicit Sized bound on some blanket impls #973

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

Closed
E-Mans-Application opened this issue Apr 14, 2025 · 0 comments · Fixed by #975
Closed

Relax implicit Sized bound on some blanket impls #973

E-Mans-Application opened this issue Apr 14, 2025 · 0 comments · Fixed by #975

Comments

@E-Mans-Application
Copy link

The blanket implementations of CanonicalSerialize and CanonicalDeserialize have an implicit bound T: Sized

As a result, Cow<'a, [T]> (for example) does not implement those traits even if T does.

The bound may be relaxed to address this case:

impl<'a, T: ?Sized + CanonicalSerialize + ToOwned> CanonicalSerialize for Cow<'a, T> {
    //
}

The same can apply to Rc<T> and Arc<T>.

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

Successfully merging a pull request may close this issue.

1 participant