Skip to content

Commit c99cccf

Browse files
committed
Added a special case for empty SEQUENCE until rust-lang/rust#29720 is landed
1 parent 7ce54f6 commit c99cccf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/macros.rs

+13
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ macro_rules! asn1 {
1414
asn1!(@field_name [$($parsed)* @type BOOLEAN @rust_type bool] [$($rest)*]);
1515
);
1616

17+
// Special case empty SEQUENCE until https://github.com/rust-lang/rust/issues/29720 is
18+
// resolved
19+
(@complete $name:ident) => {
20+
#[derive(PartialEq, Eq, Debug)]
21+
struct $name;
22+
23+
impl $name {
24+
fn asn1_description() -> Vec<(&'static str, &'static str, &'static str)> {
25+
return vec![];
26+
}
27+
}
28+
};
29+
1730
(@complete $name:ident $(, @name $field_name:ident @type $field_type:ident @rust_type $field_rust_type:ty)*) => {
1831
struct $name {
1932
$(

0 commit comments

Comments
 (0)