Skip to content

Commit

Permalink
Hide the extension_group macro
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Apr 22, 2023
1 parent e5b11f4 commit 794a3e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/extensions/messages/extension_group_macro.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[doc(hidden)]
#[macro_export]
macro_rules! extension_group {
(pub enum $name:ident$(<$lt:lifetime>)? {
$($extension:ident($extension_data:ty)),+
Expand Down Expand Up @@ -91,3 +89,7 @@ macro_rules! extension_group {
}
};
}

// This re-export makes it possible to omit #[macro_export]
// https://stackoverflow.com/a/67140319
pub(crate) use extension_group;
6 changes: 3 additions & 3 deletions src/extensions/messages/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
mod extension_group_macro;

use crate::{
extension_group,
extensions::extension_data::{
use crate::extensions::{
extension_data::{
application_layer_protocol_negotiation::ApplicationLayerProtocolNegotiation,
certificate_authorities::CertificateAuthorities,
certificate_type::{
Expand Down Expand Up @@ -46,6 +45,7 @@ use crate::{
},
use_srtp::UseSrtp,
},
messages::extension_group_macro::extension_group,
};

// Source: https://www.rfc-editor.org/rfc/rfc8446#section-4.2 table, rows marked with SH
Expand Down

0 comments on commit 794a3e6

Please sign in to comment.