diff --git a/miette-derive/src/forward.rs b/miette-derive/src/forward.rs index 6c7b5396..36177d62 100644 --- a/miette-derive/src/forward.rs +++ b/miette-derive/src/forward.rs @@ -66,15 +66,14 @@ impl WhichFn { Self::Snippets => quote! { fn snippets(&self) -> std::option::Option + '_>> }, + Self::Related => quote! { + fn related<'a>(&'a self) -> std::option::Option + 'a>> + }, } } pub fn catchall_arm(&self) -> TokenStream { - match self { - // required, hence method can't return None - Self::Code => quote! {}, - _ => quote! { _ => None, }, - } + quote! { _ => std::option::Option::None } } }