Skip to content

mir/pretty: use Option instead of Either<Once, Empty>#129167

Merged
bors merged 1 commit intorust-lang:masterfrom
cuviper:either-once-empty
Aug 17, 2024
Merged

mir/pretty: use Option instead of Either<Once, Empty>#129167
bors merged 1 commit intorust-lang:masterfrom
cuviper:either-once-empty

Conversation

@cuviper
Copy link
Member

@cuviper cuviper commented Aug 16, 2024

Either is wasteful for a one-or-none iterator, especially since Once
is already an option::IntoIter internally. We don't really need any of
the iterator mechanisms in this case, just a single conditional insert.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants