Skip to content

Move edits out of Env#143

Merged
elliottt merged 3 commits intobytecodealliance:mainfrom
elliottt:trevor/return-edits
Jun 14, 2023
Merged

Move edits out of Env#143
elliottt merged 3 commits intobytecodealliance:mainfrom
elliottt:trevor/return-edits

Conversation

@elliottt
Copy link
Copy Markdown
Member

@elliottt elliottt commented Jun 8, 2023

Return move edits from resolve_inserted_moves instead of eagerly allocating that vector in Env.

Return move edits from `resolve_inserted_moves` instead of eagerly
allocating that vector in `Env`.
@elliottt elliottt requested a review from cfallin June 8, 2023 18:10
Copy link
Copy Markdown
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Comment thread src/ion/mod.rs Outdated

Ok(Output {
edits: env
edits: edits
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we wanted to clean up just a bit more, we could add a method around this iterator chain on Edits (into_... or something). Happy to skip if you'd prefer not to though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I moved the iterator chain into a method that consumes self, and I think it cleaned things up nicely. Thanks for the suggestion!

@elliottt elliottt merged commit e530854 into bytecodealliance:main Jun 14, 2023
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