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

chore: expose InstructionResult getters in Interpreter result #1002

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Jan 22, 2024

The InterpreterResult wraps an InstructionResult

This also exposes the is_{error,success} functions on the InterpreterResult

moves struct defs around and makes calls const.

@mattsse mattsse requested a review from rakita January 22, 2024 11:55
Return {
result: InterpreterResult,
},
}
Copy link
Member

Choose a reason for hiding this comment

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

Can you revert this? I liked more having structs first than impls

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, but I very much dislike this style:

struct A;
struct B;

impl A {}
impl B {}

imo this makes it a lot harder to navigate

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

reverted

@mattsse mattsse requested a review from rakita January 22, 2024 12:06
@rakita rakita merged commit 7cf937a into bluealloy:main Jan 22, 2024
25 checks passed
@github-actions github-actions bot mentioned this pull request Jan 22, 2024
Comment on lines +317 to +318
pub const fn is_revert(&self) -> bool {
self.result.is_ok()
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems wrong no?

Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

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.

None yet

3 participants