Skip to content

Commit 7728790

Browse files
committed
der: rename OctetStringRefDeriveHack
This is a temporary type introduced in #1998 until `der_derive` can be updated to use the new type shape (see #2039).
1 parent 3d56da5 commit 7728790

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

der/src/asn1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub use self::{
4444
ia5_string::Ia5StringRef,
4545
integer::{int::IntRef, uint::UintRef},
4646
null::Null,
47-
octet_string::{OctetStringRef, OctetStringRef2},
47+
octet_string::{OctetStringRef, OctetStringRefDeriveHack},
4848
printable_string::PrintableStringRef,
4949
private::{Private, PrivateRef},
5050
sequence::{Sequence, SequenceRef},

der/src/asn1/octet_string.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ use crate::{
55
Tag, Writer, asn1::AnyRef, ord::OrdIsValueOrd,
66
};
77

8-
// TODO(tarcieri): custom derive hack until the logic is updated to support `&'a` reference types
8+
/// Custom derive hack until `der_derive` is updated to support `&'a MyRef` reference types.
9+
///
10+
/// This is not considered a stable part of the public API and may be removed without warning.
11+
// TODO(tarcieri): update `der_derive` to support `OctetStringRef` properly. See #2039
912
#[doc(hidden)]
10-
pub type OctetStringRef2<'a> = &'a OctetStringRef;
13+
pub type OctetStringRefDeriveHack<'a> = &'a OctetStringRef;
1114

1215
/// ASN.1 `OCTET STRING` type: borrowed form.
1316
///

der_derive/src/asn1_type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ impl Asn1Type {
9393
Asn1Type::BitString => quote!(::der::asn1::BitStringRef),
9494
Asn1Type::Ia5String => quote!(::der::asn1::Ia5StringRef),
9595
Asn1Type::GeneralizedTime => quote!(::der::asn1::GeneralizedTime),
96-
// TODO(tarcieri): natively support `OctetStringRef`, remove `OctetStringRef2`
97-
Asn1Type::OctetString => quote!(::der::asn1::OctetStringRef2),
96+
// TODO(tarcieri): natively support `OctetStringRef`, remove `OctetStringRefDeriveHack`
97+
Asn1Type::OctetString => quote!(::der::asn1::OctetStringRefDeriveHack),
9898
Asn1Type::PrintableString => quote!(::der::asn1::PrintableStringRef),
9999
Asn1Type::TeletexString => quote!(::der::asn1::TeletexStringRef),
100100
Asn1Type::VideotexString => quote!(::der::asn1::VideotexStringRef),

0 commit comments

Comments
 (0)