Skip to content

Conversation

@Ralith
Copy link
Owner

@Ralith Ralith commented Sep 12, 2022

No description provided.

pub fn peek(&mut self) -> Option<<Q::Fetch as Fetch<'_>>::Item> {
// Safety: returned lifetime borrows `self`, ensuring it can't overlap with a future call to
// `peek` or `next`
unsafe { self.iter.peek().map(|x| x.1) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why strip the entity ID here if it is returned by the Iterator impl? Isn't that something the caller could need and if not ignore?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, that should definitely be included.

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.

3 participants