From 14417dc0981c6a1eec5adce826d1847794e1c533 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 16 Feb 2023 08:25:12 -0500 Subject: [PATCH] Add a TODO about combining several macros and patterns --- crates/tor-cell/src/relaycell/hs/ext.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/tor-cell/src/relaycell/hs/ext.rs b/crates/tor-cell/src/relaycell/hs/ext.rs index 2eb264674..3e8bbed14 100644 --- a/crates/tor-cell/src/relaycell/hs/ext.rs +++ b/crates/tor-cell/src/relaycell/hs/ext.rs @@ -127,6 +127,10 @@ impl UnrecognizedExt { } /// Declare an Extension group that takes a given identifier. +// +// TODO: This is rather similar to restrict_msg(), isn't it? Also, We use this +// pattern of (number, (cmd, length, body)*) a few of times in Tor outside the +// hs module. Perhaps we can extend and unify our code here... macro_rules! decl_extension_group { { $( #[$meta:meta] )*