diff options
Diffstat (limited to 'src/message/handshake/features.rs')
| -rw-r--r-- | src/message/handshake/features.rs | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/message/handshake/features.rs b/src/message/handshake/features.rs index e7557e9..af967d4 100644 --- a/src/message/handshake/features.rs +++ b/src/message/handshake/features.rs @@ -49,19 +49,18 @@ pub enum Feature { impl Feature { pub fn get() -> StringList { - let mut features = StringList::new(); - features.push("ExtendedFeatures".to_string()); - #[cfg(feature = "long-message-id")] - features.push("LongMessageId".to_string()); - #[cfg(feature = "long-time")] - features.push("LongTime".to_string()); - #[cfg(feature = "rich-messages")] - features.push("RichMessages".to_string()); - #[cfg(feature = "sender-prefixes")] - features.push("SenderPrefixes".to_string()); - #[cfg(feature = "authenticators")] - features.push("Authenticators".to_string()); - - return features; + vec![ + "ExtendedFeatures".to_string(), + #[cfg(feature = "long-message-id")] + "LongMessageId".to_string(), + #[cfg(feature = "long-time")] + "LongTime".to_string(), + #[cfg(feature = "rich-messages")] + "RichMessages".to_string(), + #[cfg(feature = "sender-prefixes")] + "SenderPrefixes".to_string(), + #[cfg(feature = "authenticators")] + "Authenticators".to_string(), + ] } } |
