Skip to content

Commit

Permalink
fix: no need to box interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MedHeikelBouzayene committed Jan 5, 2025
1 parent 2425a54 commit 5436d47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions src/core/blueprint/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ impl Index {
matches!(def, Some(Definition::Scalar(_))) || scalar::Scalar::is_predefined(type_name)
}

pub fn get_interfaces(&self) -> Box<HashSet<String>> {
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<String> {
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 {
Expand Down
2 changes: 1 addition & 1 deletion src/core/jit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 5436d47

Please sign in to comment.