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

fix: delete GenericTypeEx trait #5407

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jujube
Copy link
Contributor

@jujube jujube commented Apr 11, 2024

This way, the code is clearer and easier to understand.


This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @jujube)


crates/cairo-lang-sierra/src/extensions/types.rs line 20 at r1 (raw file):

    ) -> Result<Self::Concrete, SpecializationError>;

    fn specialize_by_id(

this change makes specialized_by_id be overridable - when it isn't designed to be.

Code quote:

 fn specialize_by_id(

@jujube
Copy link
Contributor Author

jujube commented Apr 12, 2024

The function of these two implementation methods is the same.
But the original implementation is not easy to understand.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the concept of an extension trait - there's no repeated implementation.

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @jujube)

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 this pull request may close these issues.

2 participants