diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index febb0a5125eee904e53feefb132373f9e78e0c21..993e4e64f949e0ff8efe028d9ccc4231b21c7d8d 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -133,7 +133,7 @@ impl ProtocolDescription { /// A somewhat temporary method. Can be used by components to lookup type /// definitions by their name (to have their implementation somewhat /// resistant to changes in the standard library) - pub(crate) fn find_type(&self, module_name: &[u8], type_name: &[u8]) -> Option { + pub(crate) fn find_type<'a>(&'a self, module_name: &[u8], type_name: &[u8]) -> Option> { // Lookup type definition in module let root_id = self.lookup_module_root(module_name)?; let module = &self.heap[root_id]; @@ -291,8 +291,8 @@ pub struct TypeInspector<'a> { type_table: &'a MonoType, } -impl TypeInspector { - pub fn as_union(&self) -> UnionTypeInspector { +impl<'a> TypeInspector<'a> { + pub fn as_union(&'a self) -> UnionTypeInspector<'a> { let heap = self.heap.as_union(); let type_table = self.type_table.variant.as_union(); return UnionTypeInspector{ heap, type_table }; @@ -304,7 +304,7 @@ pub struct UnionTypeInspector<'a> { type_table: &'a UnionMonomorph, } -impl UnionTypeInspector { +impl UnionTypeInspector<'_> { /// Retrieves union variant tag value. pub fn get_variant_tag_value(&self, variant_name: &[u8]) -> Option { let variant_index = self.heap.variants.iter()