From ec96f9647d6e741e6ae7b62848aa508436168c76 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 5 Oct 2024 23:15:58 +0200 Subject: [PATCH] Clippy allow - unreachable_patterns - with new rust version (1.81.0) clippy is complaining: ``` error: unreachable pattern --> relay-clients/client-polkadot/src/codegen_runtime.rs:5751:22 | 5751 | Void(runtime_types::sp_core::Void), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matches no values because `codegen_runtime::api::runtime_types::sp_core::Void` is uninhabited | = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types = note: `-D unreachable-patterns` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_patterns)]` ``` --- codegen/src/api/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 2fed7a59ea..6f93a278b2 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -81,7 +81,7 @@ impl RuntimeGenerator { Ok(quote! { #( #item_mod_attrs )* - #[allow(dead_code, unused_imports, non_camel_case_types)] + #[allow(dead_code, unused_imports, non_camel_case_types, unreachable_patterns)] #[allow(clippy::all)] #[allow(rustdoc::broken_intra_doc_links)] pub mod #mod_ident { @@ -233,7 +233,7 @@ impl RuntimeGenerator { Ok(quote! { #( #item_mod_attrs )* - #[allow(dead_code, unused_imports, non_camel_case_types)] + #[allow(dead_code, unused_imports, non_camel_case_types, unreachable_patterns)] #[allow(clippy::all)] #[allow(rustdoc::broken_intra_doc_links)] pub mod #mod_ident {