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

avoid calling f twice in map #70

Merged
merged 1 commit into from
Aug 12, 2021
Merged

avoid calling f twice in map #70

merged 1 commit into from
Aug 12, 2021

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Aug 10, 2021

I think calling map(f, ks) twice is not needed, but maybe I am missing something.

@nalimilan - you were the last one to have touched this line so maybe you know the reason for the duplicate call of map?

@bkamins bkamins requested a review from nalimilan August 10, 2021 13:33
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #70 (ff0a8cd) into main (35ecfd1) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   88.36%   88.36%           
=======================================
  Files           1        1           
  Lines         275      275           
=======================================
  Hits          243      243           
  Misses         32       32           
Impacted Files Coverage Δ
src/PooledArrays.jl 88.36% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35ecfd1...ff0a8cd. Read the comment docs.

Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

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

lgtm

@bkamins
Copy link
Member Author

bkamins commented Aug 12, 2021

Thank you for approving. Let us wait for @nalimilan to comment as there is no rush in merging this.

Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

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

Good catch. This code was introduced by @shashi at 02dbbdd, and I don't see any reason there not to reuse ks1. Probably just an oversight.

@shashi
Copy link
Collaborator

shashi commented Aug 12, 2021

Sounds correct!

@bkamins bkamins merged commit 095ea81 into main Aug 12, 2021
@bkamins bkamins deleted the bkamins-patch-2 branch August 12, 2021 16:50
@bkamins
Copy link
Member Author

bkamins commented Aug 12, 2021

Thank you!

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.

4 participants