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

Use CommitIteratorExt to replace .map(|c| c.id().clone()) #3538

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

emesterhazy
Copy link
Contributor

This replaces .map(|c| c.id().clone()) with .ids().cloned().

This is a minor cleanup to use nicer syntax for getting CommitIds from an iterator of commits using the CommitIteratorExt trait.

@emesterhazy emesterhazy force-pushed the push-nzrxlwovyuvp branch 2 times, most recently from 11b4eaa to e0f6360 Compare April 19, 2024 04:19
@emesterhazy emesterhazy requested a review from yuja April 19, 2024 04:21
cli/src/commands/rebase.rs Outdated Show resolved Hide resolved
This replaces `.map(|c| c.id().clone())` with `.ids().cloned()` to use nicer
syntax for getting `CommitId`s from an iterator of commits using the
`CommitIteratorExt` trait.

In one case we can actually call `.parent_ids()` directly. I also pluralized a
variable to make it clearer that it's a vec of IDs and not a single ID.
@emesterhazy emesterhazy removed the request for review from yuja April 19, 2024 12:08
@emesterhazy emesterhazy enabled auto-merge (rebase) April 19, 2024 12:11
@emesterhazy emesterhazy merged commit 3d267de into main Apr 19, 2024
16 checks passed
@emesterhazy emesterhazy deleted the push-nzrxlwovyuvp branch April 19, 2024 12:16
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