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

Simplify internal implementation details of EndsWith #1082

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

atifaziz
Copy link
Member

This PR simplifies the implementation of EndsWith in the following ways:

  • Folds the nested condition.
  • Changes the local function (previously Impl) to be non-static so its signature can be simpler (it doesn't induce a closure).
  • Avoids a closure with All by using SequenceEqual instead.
  • Removes the unnecessary comparer initialization, which can be passed as-is to SequenceEqual.

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.22%. Comparing base (5dc9e18) to head (e52d278).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1082      +/-   ##
==========================================
- Coverage   93.23%   93.22%   -0.01%     
==========================================
  Files         112      112              
  Lines        3400     3395       -5     
  Branches      962      960       -2     
==========================================
- Hits         3170     3165       -5     
  Misses        214      214              
  Partials       16       16              
Flag Coverage Δ
93.22% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@atifaziz atifaziz merged commit e52d278 into morelinq:master Sep 22, 2024
6 checks passed
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.

1 participant