Skip to content

Refactor traits in src/types to use associative types #10

@deven96

Description

@deven96

Instead of

trait Example<T>
where T: Debug {
 fn example(&self) -> T
}

We can use associative types that look cleaner

trait Example {
 type Item: Debug;

 fn example(&self) -> Self::Item
}

Feels a lot cleaner and well defined

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions