From 8a0f71e6d11cd6f89fbad67cce46e34aa75f3b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 17 Sep 2021 11:33:39 -0700 Subject: [PATCH] fix(derive): Code is no longer required --- miette-derive/src/forward.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 } } }