From 886988bbee57d2934bd4e64833f6850932caf0ef Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Tue, 9 Jul 2024 09:26:49 -0700 Subject: [PATCH] Revert "x509-cert: specify concrete types to help the compiler (#1441)" This reverts commit 7a2d38a1c72b19d843face98db31e8083a46ac79. --- x509-cert/src/ext.rs | 2 +- x509-cert/src/ext/pkix/constraints/basic.rs | 2 +- x509-cert/src/ext/pkix/constraints/name.rs | 2 +- x509-cert/src/ext/pkix/crl/dp.rs | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/x509-cert/src/ext.rs b/x509-cert/src/ext.rs index 806fcacab..acdcc3417 100644 --- a/x509-cert/src/ext.rs +++ b/x509-cert/src/ext.rs @@ -29,7 +29,7 @@ pub mod pkix; pub struct Extension { pub extn_id: ObjectIdentifier, - #[asn1(default = "bool::default")] + #[asn1(default = "Default::default")] pub critical: bool, pub extn_value: OctetString, diff --git a/x509-cert/src/ext/pkix/constraints/basic.rs b/x509-cert/src/ext/pkix/constraints/basic.rs index 54b942a5f..c50d8e837 100644 --- a/x509-cert/src/ext/pkix/constraints/basic.rs +++ b/x509-cert/src/ext/pkix/constraints/basic.rs @@ -14,7 +14,7 @@ use der::Sequence; #[derive(Clone, Debug, Eq, PartialEq, Sequence)] #[allow(missing_docs)] pub struct BasicConstraints { - #[asn1(default = "bool::default")] + #[asn1(default = "Default::default")] pub ca: bool, pub path_len_constraint: Option, } diff --git a/x509-cert/src/ext/pkix/constraints/name.rs b/x509-cert/src/ext/pkix/constraints/name.rs index c8595a0b8..c05d00564 100644 --- a/x509-cert/src/ext/pkix/constraints/name.rs +++ b/x509-cert/src/ext/pkix/constraints/name.rs @@ -61,7 +61,7 @@ pub struct GeneralSubtree { #[asn1( context_specific = "0", tag_mode = "IMPLICIT", - default = "u32::default" + default = "Default::default" )] pub minimum: u32, diff --git a/x509-cert/src/ext/pkix/crl/dp.rs b/x509-cert/src/ext/pkix/crl/dp.rs index ed7879d45..7acd2c95d 100644 --- a/x509-cert/src/ext/pkix/crl/dp.rs +++ b/x509-cert/src/ext/pkix/crl/dp.rs @@ -31,14 +31,14 @@ pub struct IssuingDistributionPoint { #[asn1( context_specific = "1", tag_mode = "IMPLICIT", - default = "bool::default" + default = "Default::default" )] pub only_contains_user_certs: bool, #[asn1( context_specific = "2", tag_mode = "IMPLICIT", - default = "bool::default" + default = "Default::default" )] pub only_contains_ca_certs: bool, @@ -48,14 +48,14 @@ pub struct IssuingDistributionPoint { #[asn1( context_specific = "4", tag_mode = "IMPLICIT", - default = "bool::default" + default = "Default::default" )] pub indirect_crl: bool, #[asn1( context_specific = "5", tag_mode = "IMPLICIT", - default = "bool::default" + default = "Default::default" )] pub only_contains_attribute_certs: bool, }