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

Fix forever loop #260

Merged
merged 3 commits into from
Oct 18, 2024
Merged

Fix forever loop #260

merged 3 commits into from
Oct 18, 2024

Conversation

johnml1135
Copy link
Collaborator

@johnml1135 johnml1135 commented Oct 18, 2024

This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.95%. Comparing base (73a8d85) to head (9cd1101).

Files with missing lines Patch % Lines
src/SIL.Machine/Corpora/ParallelTextCorpus.cs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #260      +/-   ##
==========================================
- Coverage   69.95%   69.95%   -0.01%     
==========================================
  Files         379      379              
  Lines       31767    31770       +3     
  Branches     4454     4454              
==========================================
+ Hits        22223    22225       +2     
- Misses       8510     8511       +1     
  Partials     1034     1034              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @johnml1135)


src/SIL.Machine/Corpora/ParallelTextCorpus.cs line 579 at r1 (raw file):

                }

                bool result = _enumerator.MoveNext();

You should set _enumeratorHasMoreData instead of result, so that the field is set consistently in all cases.


src/SIL.Machine/Corpora/ParallelTextCorpus.cs line 584 at r1 (raw file):

            }

            public void Reset()

You should reset _enumeratorHasMoreData here.

@johnml1135
Copy link
Collaborator Author

src/SIL.Machine/Corpora/ParallelTextCorpus.cs line 579 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

You should set _enumeratorHasMoreData instead of result, so that the field is set consistently in all cases.

Done.

@johnml1135
Copy link
Collaborator Author

src/SIL.Machine/Corpora/ParallelTextCorpus.cs line 584 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

You should reset _enumeratorHasMoreData here.

Done.

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)

@johnml1135 johnml1135 merged commit 8191be8 into master Oct 18, 2024
4 checks passed
@johnml1135 johnml1135 deleted the fix_enumerator branch October 18, 2024 20:52
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