Skip to content

Commit ee32b83

Browse files
committed
similar show for LabelledUnitRange and LabelledUnitRangeDual
1 parent 8f358d2 commit ee32b83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

NDTensors/src/lib/GradedAxes/src/labelledunitrangedual.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ end
2424
# fix ambiguities
2525
Base.getindex(a::LabelledUnitRangeDual, i::Integer) = dual(nondual(a)[i])
2626

27-
function Base.show(io::IO, ::MIME"text/plain", a::LabelledUnitRangeDual)
27+
function Base.show(
28+
io::IO, ::MIME"text/plain", a::Union{LabelledUnitRange,LabelledUnitRangeDual}
29+
)
2830
println(io, typeof(a))
2931
return print(io, label(a), " => ", unlabel(a))
3032
end
3133

32-
function Base.show(io::IO, a::LabelledUnitRangeDual)
34+
function Base.show(io::IO, a::Union{LabelledUnitRange,LabelledUnitRangeDual})
3335
return print(io, nameof(typeof(a)), " ", label(a), " => ", unlabel(a))
3436
end
3537

0 commit comments

Comments
 (0)