From fe07344cb41f6013a4c7f975a31ccc11e2f2090d Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Wed, 11 Dec 2024 12:55:05 +0100 Subject: [PATCH] use `vec![]` for the `get_status` vector --- src/flutclient.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flutclient.rs b/src/flutclient.rs index fcbb0f2..f8a771a 100644 --- a/src/flutclient.rs +++ b/src/flutclient.rs @@ -37,14 +37,14 @@ macro_rules! build_parser_type_enum { impl ParserTypes { pub fn get_status() -> Vec { - let mut protos = Vec::new(); + vec![ $( #[cfg(feature = $feat)] - protos.push(ProtocolStatus::Enabled($feat)); + ProtocolStatus::Enabled($feat), #[cfg(not(feature = $feat))] - protos.push(ProtocolStatus::Disabled($feat)); + ProtocolStatus::Disabled($feat), )* - protos + ] } pub fn announce() {