Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Runtime: refactor Checkable trait to be more generic #212

@rphmeier

Description

@rphmeier

paritytech/polkadot#195 (comment)

trait Checkable<T> {
    type Checked;

    fn check_with(&self, ctx: T) -> Result<Self::Checked, Self>;

    fn check(&self) -> Result<Self::Checked, Self> where Self: Checkable<(), Checked=Self::Checked> {
        self.check_with(())
    }
}

should be good enough for the trait definition.

Metadata

Metadata

Assignees

Labels

I7-refactorCode needs refactoring.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions