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(forge): fix debugger buffer-write highlight else-if fallthrough #7126

Merged

Conversation

emo-eth
Copy link
Contributor

@emo-eth emo-eth commented Feb 14, 2024

Motivation

Was a bit late pushing my last commit to #7110, apologies cc @DaniPopes

The check on read_accesses should check both that it's Some and that the active buffer matches, else writes to the memory buffer won't get highlighted.

This doesn't feel particularly elegant, so let me know if there's a better way to check if a member is Some and check against a member of that member in the same conditional.

As noted in a comment in the previous PR, behavior should be tweaked in the future to allow simultaneous read+write highlights for MCOPY

Solution

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

This kind of condition is doable with the unstable let-chains:

if let Some((kind, _)) = accesses.read
    && kind == self.active_buffer

Otherwise this is fine

@DaniPopes DaniPopes merged commit e9dad71 into foundry-rs:master Feb 14, 2024
19 checks passed
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