use vec![] for the get_status vector

This commit is contained in:
Noa Aarts 2024-12-11 12:55:05 +01:00
parent 6dc11526d8
commit fe07344cb4
Signed by: noa
GPG key ID: 1850932741EFF672

View file

@ -37,14 +37,14 @@ macro_rules! build_parser_type_enum {
impl ParserTypes {
pub fn get_status() -> Vec<ProtocolStatus> {
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() {