From 0bb739dce31dd5f3dcd81b7838bcfd311886ed71 Mon Sep 17 00:00:00 2001 From: Steven Schveighoffer Date: Wed, 19 Feb 2025 12:26:50 -0500 Subject: [PATCH] Use Entry struct from TypeInfo_AssociativeArray instead of local one, just one less template and one less place to maintain. --- druntime/src/core/internal/newaa.d | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/druntime/src/core/internal/newaa.d b/druntime/src/core/internal/newaa.d index 19a33160ebbd..47283f280301 100644 --- a/druntime/src/core/internal/newaa.d +++ b/druntime/src/core/internal/newaa.d @@ -75,15 +75,6 @@ private size_t mix(size_t h) @safe pure nothrow @nogc return h; } -struct Entry(K, V) -{ - // can make this const, because we aren't really going to use it aside from - // construction. - const K key; - V value; -} - - // create a binary-compatible AA structure that can be used directly as an // associative array. // NOTE: this must only be called during CTFE @@ -92,7 +83,7 @@ AAShell makeAA(K, V)(V[K] src) @trusted assert(__ctfe, "makeAA Must only be called at compile time"); immutable srclen = src.length; assert(srclen <= uint.max); - alias E = Entry!(K, V); + alias E = TypeInfo_AssociativeArray.Entry!(K, V); if (srclen == 0) return AAShell.init; // first, determine the size that would be used if we grew the bucket list