From 5436d47e3a22e6a5badfbb15238af88d027de722 Mon Sep 17 00:00:00 2001 From: Heikel Date: Sun, 5 Jan 2025 01:01:38 +0100 Subject: [PATCH] fix: no need to box interfaces --- src/core/blueprint/index.rs | 18 ++++++++---------- src/core/jit/builder.rs | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/core/blueprint/index.rs b/src/core/blueprint/index.rs index b5f586c6c4..d64213a731 100644 --- a/src/core/blueprint/index.rs +++ b/src/core/blueprint/index.rs @@ -40,16 +40,14 @@ impl Index { matches!(def, Some(Definition::Scalar(_))) || scalar::Scalar::is_predefined(type_name) } - pub fn get_interfaces(&self) -> Box> { - Box::new( - self.map - .iter() - .filter_map(|(_, (def, _))| match def { - Definition::Interface(i) => Some(i.name.to_owned()), - _ => None, - }) - .collect(), - ) + pub fn get_interfaces(&self) -> HashSet { + self.map + .iter() + .filter_map(|(_, (def, _))| match def { + Definition::Interface(i) => Some(i.name.to_owned()), + _ => None, + }) + .collect() } pub fn type_is_enum(&self, type_name: &str) -> bool { diff --git a/src/core/jit/builder.rs b/src/core/jit/builder.rs index da7ce6db3d..fef92acf45 100644 --- a/src/core/jit/builder.rs +++ b/src/core/jit/builder.rs @@ -364,7 +364,7 @@ impl<'a> Builder<'a> { operation.ty, self.index.clone(), is_introspection_query, - Some(*self.index.get_interfaces()), + Some(self.index.get_interfaces()), ); Ok(plan) }