Skip to content

Commit 9f44be3

Browse files
committed
simplify dual
1 parent e93e326 commit 9f44be3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/spaces/gradedspace.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ function Base.show(io::IO, V::GradedSpace)
212212
io = IOContext(io, :typeinfo => Pair{sectortype(V), Int})
213213

214214
pre *= "("
215-
post = isdual(V) ? ")'" : ")"
215+
if isdual(V)
216+
post = ")'"
217+
V = dual(V)
218+
else
219+
post = ")"
220+
end
216221
hdots = " \u2026 "
217222
sep = ", "
218223
sepsize = length(sep)
@@ -221,7 +226,7 @@ function Base.show(io::IO, V::GradedSpace)
221226
screenwidth = limited ? displaysize(io)[2] : typemax(Int)
222227
screenwidth -= length(pre) + length(post)
223228

224-
cs = reshape(collect([(isdual(V) ? dual(c) : c) => dim(V, c) for c in sectors(V)]), 1, :)
229+
cs = reshape(collect([c => dim(V, c) for c in sectors(V)]), 1, :)
225230
ncols = length(cs)
226231

227232
maxpossiblecols = screenwidth ÷ (1 + sepsize)

0 commit comments

Comments
 (0)