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

Clean up some internal WASI code #2325

Merged
merged 1 commit into from
May 20, 2021
Merged

Clean up some internal WASI code #2325

merged 1 commit into from
May 20, 2021

Conversation

MarkMcCaskey
Copy link
Contributor

@MarkMcCaskey MarkMcCaskey commented May 19, 2021

Shout out to @Earthmark on GitHub for the suggestions

Comments left on #2247, I completely forgot about the PR and didn't see any of the comments until this morning when I saw that the PR had been shipped.


This PR addresses some community feedback by rewording a doc comment and updating the internals of a function using 3 mutable variables to find the best fit to only use 1 mutable variable. This change increases readability of the code by making it obvious that all 3 variables are conveying the same bit of information: that we found a match.

Shout out to @Earthmark on GitHub for the suggestions
@MarkMcCaskey MarkMcCaskey mentioned this pull request May 19, 2021
1 task
Copy link
Contributor

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Looks good to me :-). Thanks!

@Hywan Hywan self-assigned this May 20, 2021
@Hywan Hywan added 🎉 enhancement New feature! 📦 lib-wasi About wasmer-wasi labels May 20, 2021
@Hywan
Copy link
Contributor

Hywan commented May 20, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented May 20, 2021

@bors bors bot merged commit ba7ee10 into master May 20, 2021
@bors bors bot deleted the misc/clean-up-wasi-internals branch May 20, 2021 13:15
@Earthmark
Copy link
Contributor

Thank you that is much clearer for me to understand, the comment guides me to the right understanding and the internal flow now shows me that the three values are bound!
I also didn't realize you could declare enums inside a function, in my mind the solution was an optional tuple but your solution is much more straightforward to read.

Hope y'all have a good day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! 📦 lib-wasi About wasmer-wasi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants