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 deleteFirst instead of filter #100

Merged
merged 1 commit into from
Oct 13, 2020
Merged

Use deleteFirst instead of filter #100

merged 1 commit into from
Oct 13, 2020

Conversation

int-index
Copy link
Collaborator

Unless I'm missing something, the element can occur at most once, so checking any elements after the deleted one is pointless. By using a custom helper instead of filter, we can avoid the extra checks.

Copy link

@hint-man hint-man bot left a comment

Choose a reason for hiding this comment

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

There is no place for me here... I will choose the truth I like.

Copy link
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

@int-index Thanks! This is a nice improvement 🙂

@chshersh chshersh merged commit 73e7201 into master Oct 13, 2020
@chshersh chshersh deleted the delete-first branch October 13, 2020 20:44
@chshersh chshersh added this to the v0.4.0.0: Boost milestone Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants