Remove unnecessary helper function

This commit is contained in:
Simon Hausmann 2024-08-12 17:46:22 +02:00 committed by Simon Hausmann
parent 5e39e211c2
commit 28f9d3cc71
2 changed files with 4 additions and 5 deletions

View file

@ -243,10 +243,6 @@ impl Document {
self.exports.iter().filter_map(|e| e.1.as_ref().left()).filter(|c| !c.is_global()).cloned()
}
pub fn exposed_structs_and_enums(&self) -> Vec<Type> {
self.used_types.borrow().structs_and_enums.clone()
}
/// This is the component that is going to be instantiated by the interpreter
pub fn last_exported_component(&self) -> Option<Rc<Component>> {
self.exports

View file

@ -875,11 +875,14 @@ pub async fn load(
diag.push_error_with_span("No component found".into(), Default::default());
};
#[cfg(feature = "internal")]
let structs_and_enums = doc.used_types.borrow().structs_and_enums.clone();
CompilationResult {
diagnostics: diag.into_iter().collect(),
components,
#[cfg(feature = "internal")]
structs_and_enums: doc.exposed_structs_and_enums(),
structs_and_enums,
}
}