From b0b508226f92fd6babfa1086339fd63415a996b9 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Wed, 1 Apr 2026 13:20:33 +0200 Subject: [PATCH] performance: distrname: use `@generated` --- src/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/show.jl b/src/show.jl index 31bc5cd92c..5fa7c1c736 100644 --- a/src/show.jl +++ b/src/show.jl @@ -7,7 +7,7 @@ # this function to provide a name that is easier to read, # especially when the type is parametric. # -distrname(d::Distribution) = string(typeof(d)) +@generated distrname(d::Distribution) = string(d) show(io::IO, d::Distribution) = show(io, d, fieldnames(typeof(d)))