Skip to content

Conversation

@Orace
Copy link
Contributor

@Orace Orace commented Nov 5, 2019

Fix #626

  • Add a test for SkipLast for ICollection input sequence
  • Add a custom implementation for SkipLast that avoid object creation for each item

- Add a custom implementation for SkipLast that avoid object creation for each item
Copy link
Contributor Author

@Orace Orace left a comment

Choose a reason for hiding this comment

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

Add a unit test to detect multiple calls to move next after sequence end
Use a hasNext variable.

{
queue.Enqueue(enumerator.Current);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

MoveNext is called after the sequence end if it is too short
Tests should have detected that.

@atifaziz
Copy link
Member

Closing as this is no longer an issue (see 59818a3 in #759).

@atifaziz atifaziz closed this Dec 29, 2024
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.

SkipLast is not optimal

2 participants