From 99a00875a8984d09cc561d92ea7a369799b02ca3 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 24 Aug 2024 18:18:22 -0500 Subject: [PATCH] cl-intern: Derive Default for StringInterner and TypedInterner --- compiler/cl-structures/src/intern.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/cl-structures/src/intern.rs b/compiler/cl-structures/src/intern.rs index 4e3e7f9..a87552d 100644 --- a/compiler/cl-structures/src/intern.rs +++ b/compiler/cl-structures/src/intern.rs @@ -119,6 +119,7 @@ pub mod string_interner { }; /// A string interner hands out [Interned] copies of each unique string given to it. + #[derive(Default)] pub struct StringInterner<'a> { arena: DroplessArena<'a>, keys: RwLock>, @@ -258,6 +259,7 @@ pub mod typed_interner { /// A [TypedInterner] hands out [Interned] references for arbitrary types. /// /// See the [module-level documentation](self) for more information. + #[derive(Default)] pub struct TypedInterner<'a, T: Eq + Hash> { arena: TypedArena<'a, T>, keys: RwLock>,