Closed timholy closed 2 years ago
Merging #136 (7eeb2dc) into master (b7f7418) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #136 +/- ##
=======================================
Coverage 97.29% 97.29%
=======================================
Files 4 4
Lines 775 775
=======================================
Hits 754 754
Misses 21 21
Impacted Files | Coverage Δ | |
---|---|---|
src/extract.jl | 98.11% <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 b7f7418...7eeb2dc. Read the comment docs.
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 AbstractString
s used in the tests are already String
or SubString{String}
:
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
This should be safe to merge now, but no rush either.
This will probably fail without the new
convert
methods in https://github.com/JuliaLang/julia/pull/44500, so wait until that is merged and we're ready to commit to Julia 1.9.