From 7f713f554254f0175a378239d8a1d77b647c4b16 Mon Sep 17 00:00:00 2001 From: Ilya Priven <1186084+ikonst@users.noreply.github.com> Date: Sat, 15 Mar 2025 02:17:48 +0000 Subject: [PATCH] Do not embed reflect.Type to avoid supressing DCE --- cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache.go b/cache.go index 3733858..4e3109e 100644 --- a/cache.go +++ b/cache.go @@ -42,7 +42,7 @@ func (fs fields) Less(i, j int) bool { type typeKey struct { tag string - reflect.Type + typ reflect.Type } type fieldMap map[string]fields @@ -92,7 +92,7 @@ func buildFields(k typeKey) fields { tag } - q := fields{{typ: k.Type}} + q := fields{{typ: k.typ}} visited := make(map[key]struct{}) fm := make(fieldMap)