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

use generic interface instead of accessing fields #19

Merged
merged 2 commits into from
Aug 20, 2020

Conversation

SimonDanisch
Copy link
Member

....since not all IOs have a lock field...

....since not all IOs have a lock field...
@IanButterworth
Copy link
Member

Seems like the right thing to do, but I'm not sure how to fix the tests like this that are breaking

open(io->PNGFiles.save(io, read_in_pngf), newpath, "w") #test IO method

@codecov
Copy link

codecov bot commented Aug 20, 2020

Codecov Report

Merging #19 into master will decrease coverage by 0.38%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
- Coverage   73.41%   73.03%   -0.39%     
==========================================
  Files           4        4              
  Lines         331      330       -1     
==========================================
- Hits          243      241       -2     
- Misses         88       89       +1     
Impacted Files Coverage Δ
src/io.jl 93.56% <88.88%> (-0.46%) ⬇️

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 249d996...12f777c. Read the comment docs.

@SimonDanisch
Copy link
Member Author

Fixed!

@IanButterworth
Copy link
Member

Awesome, thanks!


maybe_lock(f, io::IO) = lock(f, io)
# IOStream doesn't support locking...
maybe_lock(f, io::IOStream) = f()
Copy link
Member

Choose a reason for hiding this comment

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

According to the report in JuliaImages/Images.jl#912 (comment)

It looks like IOBuffer should also be included as a special case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably? I guess you could add that to #21

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