mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
avoid comparison warnings in show
This commit is contained in:
parent
05b7274ee7
commit
20f0734d6f
@ -157,11 +157,12 @@ function show(io::IO, A::GroupRing)
|
||||
end
|
||||
|
||||
function show(io::IO, X::GroupRingElem)
|
||||
if X == parent(X)()
|
||||
T = eltype(X.coeffs)
|
||||
if X == parent(X)(T)
|
||||
print(io, "0*$((parent(X).group)())")
|
||||
else
|
||||
T = eltype(X.coeffs)
|
||||
elts = ("$(X.coeffs[i])*$(parent(X).basis[i])" for i in 1:length(X) if X.coeffs[i] != zero(T))
|
||||
|
||||
elts = ("$(X[i])*$(parent(X).basis[i])" for i in 1:length(X) if X[i] != zero(T))
|
||||
join(io, elts, " + ")
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user