From cbc0a13d9b19552976bc7177567cbaab9993127a Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 31 Aug 2022 18:50:59 +0000 Subject: fix a couple more possible panics --- azalea-protocol/packet-macros/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-protocol/packet-macros/src') diff --git a/azalea-protocol/packet-macros/src/lib.rs b/azalea-protocol/packet-macros/src/lib.rs index f96a85c7..4f47c9a9 100644 --- a/azalea-protocol/packet-macros/src/lib.rs +++ b/azalea-protocol/packet-macros/src/lib.rs @@ -254,18 +254,18 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { if !has_serverbound_packets { serverbound_id_match_contents.extend(quote! { - _ => panic!("This enum is empty and can't exist.") + _ => unreachable!("This enum is empty and can't exist.") }); serverbound_write_match_contents.extend(quote! { - _ => panic!("This enum is empty and can't exist.") + _ => unreachable!("This enum is empty and can't exist.") }); } if !has_clientbound_packets { clientbound_id_match_contents.extend(quote! { - _ => panic!("This enum is empty and can't exist.") + _ => unreachable!("This enum is empty and can't exist.") }); clientbound_write_match_contents.extend(quote! { - _ => panic!("This enum is empty and can't exist.") + _ => unreachable!("This enum is empty and can't exist.") }); } -- cgit v1.2.3