From ad0eca53cf137c8611c73cdb8cbe2c0041f415a6 Mon Sep 17 00:00:00 2001 From: adrhill Date: Thu, 5 Sep 2024 17:03:37 +0200 Subject: [PATCH] Shorter solution --- src/adtypes_interface.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/adtypes_interface.jl b/src/adtypes_interface.jl index 879fc42..b373477 100644 --- a/src/adtypes_interface.jl +++ b/src/adtypes_interface.jl @@ -159,10 +159,8 @@ end ## Pretty printing for detector in (:TracerSparsityDetector, :TracerLocalSparsityDetector) - @eval function Base.show( - io::IO, d::$detector{TG,TH}; indent=0 - ) where {PG,TG<:GradientTracer{PG},PH,TH<:HessianTracer{PH}} - if PG == DEFAULT_GRADIENT_PATTERN && PH == DEFAULT_HESSIAN_PATTERN + @eval function Base.show(io::IO, d::$detector{TG,TH}) where {TG,TH} + if TG == DEFAULT_GRADIENT_TRACER && TH == DEFAULT_HESSIAN_TRACER println(io, $detector, "()") else println(io, $detector, "{", TG, ",", TH, "}()")