Skip to content

Relax implicit Sized bound on some blanket impls #973

Closed
@E-Mans-Application

Description

@E-Mans-Application

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>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions