Standardize string types in match call#136
Conversation
Codecov Report
@@ Coverage Diff @@
## master #136 +/- ##
=======================================
Coverage 97.29% 97.29%
=======================================
Files 4 4
Lines 775 775
=======================================
Hits 754 754
Misses 21 21
Continue to review full report at Codecov.
|
|
CI still passed but not sure if that just means that this piece of code is untested. |
|
I wondered about that too. https://app.codecov.io/gh/JuliaIO/Tar.jl/blob/master/src/extract.jl indicates it's tested. Presumably all julia> struct A end; struct B end;
julia> a = A()
A()
julia> convert(Union{A,B}, a)
A()So it's only formally needed, to handle cases like julia> struct C end
julia> Base.convert(::Type{A}, c::C) = A(); Base.convert(::Type{B}, c::C) = B();
julia> convert(Union{A, B}, C())
ERROR: MethodError: Cannot `convert` an object of type
C to an object of type
Union{A, B}
Closest candidates are:
convert(::Type{T}, ::T) where T at essentials.jl:205
Stacktrace:
[1] top-level scope
@ REPL[33]:1 |
| @@ -587,7 +587,7 @@ function read_standard_header( | |||
| check_checksum_field(buf) | |||
| catch err | |||
| if err isa ErrorException | |||
There was a problem hiding this comment.
Unrelated to the PR but this should probably not be a standard ErrorException but something more specific.
|
This should be safe to merge now, but no rush either. |
This will probably fail without the new
convertmethods in JuliaLang/julia#44500, so wait until that is merged and we're ready to commit to Julia 1.9.