diff options
| author | Max Audron <me@audron.dev> | 2026-02-21 14:35:01 +0100 |
|---|---|---|
| committer | Max Audron <me@audron.dev> | 2026-02-21 14:35:01 +0100 |
| commit | f42ef4bec6d1c63c0d8564cfb06e996666dedbe3 (patch) | |
| tree | e526bf4cae5ecf798469acc157b14122d4a5e25a /src/message/handshake/features.rs | |
| parent | replace all match_variant instances with try_into (diff) | |
clean up clippy lints
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(), + ] } } |
