Skip to content

Commit fa9f2f2

Browse files
authored
der: fix bug in impl Choice for Application and Private (#1944)
1 parent 858f3af commit fa9f2f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

der/src/asn1/internal_macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ macro_rules! impl_custom_class {
169169
T: Decode<'a> + Tagged,
170170
{
171171
fn can_decode(tag: Tag) -> bool {
172-
tag.is_context_specific()
172+
tag.class() == Class::$class_enum_name
173173
}
174174
}
175175

@@ -303,7 +303,7 @@ macro_rules! impl_custom_class_ref {
303303
}
304304

305305
impl<'a, T> $ref_class_type_name<'a, T> {
306-
/// Convert to a [`ContextSpecific`].
306+
/// Convert to a [`EncodeValue`] object using [`EncodeValueRef`].
307307
fn encoder(&self) -> $class_type_name<EncodeValueRef<'a, T>> {
308308
$class_type_name {
309309
tag_number: self.tag_number,

0 commit comments

Comments
 (0)