Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

🐐 Replace joins for loop with a .find array opt. #1532

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samccone
Copy link

@samccone samccone commented Dec 1, 2017

The intent of the for loop in this case was to find (if present) an entity in the joinObserveArray who's queue has no elements, when that element was found hasValues was set to false and the for loop was exited.

The semantics of this code can be replaced with a more "idiomatic" find operation which will do the following:

  1. loop over each element until an element is found
  2. return the found element which can be used to set hasValues to false;

Thanks so much for your time reviewing this PR and have a great day!

The intent of the for loop in this case was to find (if present) an entity in the joinObserveArray who's queue has no elements, when that element was found hasValues was set to false and the for loop was exited.

The semantics of this code can be replaced with a more "idiomatic" find operation which will do the following:

1. loop over each element until an element is found
2. return the found element which can be used to set hasValues to false;

---

Thanks so much for your time reviewing this PR and have a great day!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant