From 057a81b9a498b933febf19c84b279fe715311025 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Mon, 9 Aug 2021 16:41:07 -0500 Subject: [PATCH] Remove unused `*Ref` parameters to macro This doesn't actually do anything, it just makes it more clear that those parameters are ignored. --- boring/src/asn1.rs | 24 ------------------------ boring/src/bn.rs | 8 -------- boring/src/conf.rs | 1 - boring/src/ec.rs | 8 -------- boring/src/ecdsa.rs | 4 ---- boring/src/macros.rs | 2 -- boring/src/pkcs12.rs | 1 - boring/src/srtp.rs | 2 -- boring/src/ssl/mod.rs | 15 --------------- boring/src/string.rs | 1 - boring/src/x509/mod.rs | 19 ------------------- boring/src/x509/store.rs | 4 ---- boring/src/x509/verify.rs | 2 -- 13 files changed, 91 deletions(-) diff --git a/boring/src/asn1.rs b/boring/src/asn1.rs index 7bc9d1ed..3ab1aede 100644 --- a/boring/src/asn1.rs +++ b/boring/src/asn1.rs @@ -57,10 +57,6 @@ foreign_type_and_impl_send_sync! { /// /// [ASN1_GENERALIZEDTIME_set]: https://www.openssl.org/docs/manmaster/man3/ASN1_GENERALIZEDTIME_set.html pub struct Asn1GeneralizedTime; - /// Reference to a [`Asn1GeneralizedTime`] - /// - /// [`Asn1GeneralizedTime`]: struct.Asn1GeneralizedTime.html - pub struct Asn1GeneralizedTimeRef; } impl fmt::Display for Asn1GeneralizedTimeRef { @@ -113,10 +109,6 @@ foreign_type_and_impl_send_sync! { /// /// [ASN_TIME_set]: https://www.openssl.org/docs/man1.1.0/crypto/ASN1_TIME_set.html pub struct Asn1Time; - /// Reference to an [`Asn1Time`] - /// - /// [`Asn1Time`]: struct.Asn1Time.html - pub struct Asn1TimeRef; } impl Asn1TimeRef { @@ -327,10 +319,6 @@ foreign_type_and_impl_send_sync! { /// /// [ASN1_STRING-to_UTF8]: https://www.openssl.org/docs/man1.1.0/crypto/ASN1_STRING_to_UTF8.html pub struct Asn1String; - /// Reference to [`Asn1String`] - /// - /// [`Asn1String`]: struct.Asn1String.html - pub struct Asn1StringRef; } impl Asn1StringRef { @@ -395,10 +383,6 @@ foreign_type_and_impl_send_sync! { /// [`bn`]: ../bn/index.html /// [`ASN1_INTEGER_set`]: https://www.openssl.org/docs/man1.1.0/crypto/ASN1_INTEGER_set.html pub struct Asn1Integer; - /// Reference to [`Asn1Integer`] - /// - /// [`Asn1Integer`]: struct.Asn1Integer.html - pub struct Asn1IntegerRef; } impl Asn1Integer { @@ -458,10 +442,6 @@ foreign_type_and_impl_send_sync! { /// /// [`x509`]: ../x509/struct.X509.html#method.signature pub struct Asn1BitString; - /// Reference to [`Asn1BitString`] - /// - /// [`Asn1BitString`]: struct.Asn1BitString.html - pub struct Asn1BitStringRef; } impl Asn1BitStringRef { @@ -499,10 +479,6 @@ foreign_type_and_impl_send_sync! { /// [`nid::COMMONNAME`]: ../nid/constant.COMMONNAME.html /// [`OBJ_nid2obj`]: https://www.openssl.org/docs/man1.1.0/crypto/OBJ_obj2nid.html pub struct Asn1Object; - /// Reference to [`Asn1Object`] - /// - /// [`Asn1Object`]: struct.Asn1Object.html - pub struct Asn1ObjectRef; } impl Asn1Object { diff --git a/boring/src/bn.rs b/boring/src/bn.rs index 7c4e4782..c3739889 100644 --- a/boring/src/bn.rs +++ b/boring/src/bn.rs @@ -65,10 +65,6 @@ foreign_type_and_impl_send_sync! { /// /// [`BN_CTX`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_CTX_new.html pub struct BigNumContext; - /// Reference to [`BigNumContext`] - /// - /// [`BigNumContext`]: struct.BigNumContext.html - pub struct BigNumContextRef; } impl BigNumContext { @@ -113,10 +109,6 @@ foreign_type_and_impl_send_sync! { /// # fn main () { bignums(); } /// ``` pub struct BigNum; - /// Reference to a [`BigNum`] - /// - /// [`BigNum`]: struct.BigNum.html - pub struct BigNumRef; } impl BigNumRef { diff --git a/boring/src/conf.rs b/boring/src/conf.rs index 660dc26e..c94dde4a 100644 --- a/boring/src/conf.rs +++ b/boring/src/conf.rs @@ -29,7 +29,6 @@ foreign_type_and_impl_send_sync! { fn drop = ffi::NCONF_free; pub struct Conf; - pub struct ConfRef; } impl Conf { diff --git a/boring/src/ec.rs b/boring/src/ec.rs index c6d1f139..5738344e 100644 --- a/boring/src/ec.rs +++ b/boring/src/ec.rs @@ -107,10 +107,6 @@ foreign_type_and_impl_send_sync! { /// [wiki]: https://wiki.openssl.org/index.php/Command_Line_Elliptic_Curve_Operations /// [`Nid`]: ../nid/index.html pub struct EcGroup; - /// Reference to [`EcGroup`] - /// - /// [`EcGroup`]: struct.EcGroup.html - pub struct EcGroupRef; } impl EcGroup { @@ -259,10 +255,6 @@ foreign_type_and_impl_send_sync! { /// /// [`EC_POINT_new`]: https://www.openssl.org/docs/man1.1.0/crypto/EC_POINT_new.html pub struct EcPoint; - /// Reference to [`EcPoint`] - /// - /// [`EcPoint`]: struct.EcPoint.html - pub struct EcPointRef; } impl EcPointRef { diff --git a/boring/src/ecdsa.rs b/boring/src/ecdsa.rs index a9159fc9..0d333003 100644 --- a/boring/src/ecdsa.rs +++ b/boring/src/ecdsa.rs @@ -22,10 +22,6 @@ foreign_type_and_impl_send_sync! { /// /// [`ECDSA_sign`]: https://www.openssl.org/docs/man1.1.0/crypto/ECDSA_sign.html pub struct EcdsaSig; - /// Reference to [`EcdsaSig`] - /// - /// [`EcdsaSig`]: struct.EcdsaSig.html - pub struct EcdsaSigRef; } impl EcdsaSig { diff --git a/boring/src/macros.rs b/boring/src/macros.rs index 68bb8db1..0dcc5fae 100644 --- a/boring/src/macros.rs +++ b/boring/src/macros.rs @@ -139,8 +139,6 @@ macro_rules! foreign_type_and_impl_send_sync { $(#[$owned_attr:meta])* pub struct $owned:ident; - $(#[$borrowed_attr:meta])* - pub struct $borrowed:ident; ) => { foreign_type! { diff --git a/boring/src/pkcs12.rs b/boring/src/pkcs12.rs index c4c65d1b..4caec029 100644 --- a/boring/src/pkcs12.rs +++ b/boring/src/pkcs12.rs @@ -20,7 +20,6 @@ foreign_type_and_impl_send_sync! { fn drop = ffi::PKCS12_free; pub struct Pkcs12; - pub struct Pkcs12Ref; } impl Pkcs12Ref { diff --git a/boring/src/srtp.rs b/boring/src/srtp.rs index 1cd5983a..84deca9e 100644 --- a/boring/src/srtp.rs +++ b/boring/src/srtp.rs @@ -13,8 +13,6 @@ foreign_type_and_impl_send_sync! { fn drop = free; pub struct SrtpProtectionProfile; - /// Reference to `SrtpProtectionProfile`. - pub struct SrtpProtectionProfileRef; } impl Stackable for SrtpProtectionProfile { diff --git a/boring/src/ssl/mod.rs b/boring/src/ssl/mod.rs index a52f46ef..c3acfabc 100644 --- a/boring/src/ssl/mod.rs +++ b/boring/src/ssl/mod.rs @@ -1585,11 +1585,6 @@ foreign_type_and_impl_send_sync! { /// Applications commonly configure a single `SslContext` that is shared by all of its /// `SslStreams`. pub struct SslContext; - - /// Reference to [`SslContext`] - /// - /// [`SslContext`]: struct.SslContext.html - pub struct SslContextRef; } impl Clone for SslContext { @@ -1964,11 +1959,6 @@ foreign_type_and_impl_send_sync! { /// /// These can be cached to share sessions across connections. pub struct SslSession; - - /// Reference to [`SslSession`]. - /// - /// [`SslSession`]: struct.SslSession.html - pub struct SslSessionRef; } impl Clone for SslSession { @@ -2092,11 +2082,6 @@ foreign_type_and_impl_send_sync! { /// /// [`SslContext`]: struct.SslContext.html pub struct Ssl; - - /// Reference to an [`Ssl`]. - /// - /// [`Ssl`]: struct.Ssl.html - pub struct SslRef; } impl fmt::Debug for Ssl { diff --git a/boring/src/string.rs b/boring/src/string.rs index 0865c3e8..6fca5397 100644 --- a/boring/src/string.rs +++ b/boring/src/string.rs @@ -14,7 +14,6 @@ foreign_type_and_impl_send_sync! { fn drop = free; pub struct OpensslString; - pub struct OpensslStringRef; } impl fmt::Display for OpensslString { diff --git a/boring/src/x509/mod.rs b/boring/src/x509/mod.rs index 28b12fd3..a02403f4 100644 --- a/boring/src/x509/mod.rs +++ b/boring/src/x509/mod.rs @@ -47,9 +47,6 @@ foreign_type_and_impl_send_sync! { /// An `X509` certificate store context. pub struct X509StoreContext; - - /// Reference to `X509StoreContext`. - pub struct X509StoreContextRef; } impl X509StoreContext { @@ -379,8 +376,6 @@ foreign_type_and_impl_send_sync! { /// An `X509` public key certificate. pub struct X509; - /// Reference to `X509`. - pub struct X509Ref; } impl X509Ref { @@ -733,8 +728,6 @@ foreign_type_and_impl_send_sync! { /// Permit additional fields to be added to an `X509` v3 certificate. pub struct X509Extension; - /// Reference to `X509Extension`. - pub struct X509ExtensionRef; } impl Stackable for X509Extension { @@ -863,8 +856,6 @@ foreign_type_and_impl_send_sync! { /// The names of an `X509` certificate. pub struct X509Name; - /// Reference to `X509Name`. - pub struct X509NameRef; } impl X509Name { @@ -956,8 +947,6 @@ foreign_type_and_impl_send_sync! { /// A name entry associated with a `X509Name`. pub struct X509NameEntry; - /// Reference to `X509NameEntry`. - pub struct X509NameEntryRef; } impl X509NameEntryRef { @@ -1114,8 +1103,6 @@ foreign_type_and_impl_send_sync! { /// An `X509` certificate request. pub struct X509Req; - /// Reference to `X509Req`. - pub struct X509ReqRef; } impl X509Req { @@ -1298,8 +1285,6 @@ foreign_type_and_impl_send_sync! { /// An `X509` certificate alternative names. pub struct GeneralName; - /// Reference to `GeneralName`. - pub struct GeneralNameRef; } impl GeneralNameRef { @@ -1377,8 +1362,6 @@ foreign_type_and_impl_send_sync! { /// An `X509` certificate signature algorithm. pub struct X509Algorithm; - /// Reference to `X509Algorithm`. - pub struct X509AlgorithmRef; } impl X509AlgorithmRef { @@ -1399,8 +1382,6 @@ foreign_type_and_impl_send_sync! { /// An `X509` or an X509 certificate revocation list. pub struct X509Object; - /// Reference to `X509Object` - pub struct X509ObjectRef; } impl X509ObjectRef { diff --git a/boring/src/x509/store.rs b/boring/src/x509/store.rs index 4fc56c85..d244c640 100644 --- a/boring/src/x509/store.rs +++ b/boring/src/x509/store.rs @@ -49,8 +49,6 @@ foreign_type_and_impl_send_sync! { /// A builder type used to construct an `X509Store`. pub struct X509StoreBuilder; - /// Reference to an `X509StoreBuilder`. - pub struct X509StoreBuilderRef; } impl X509StoreBuilder { @@ -96,8 +94,6 @@ foreign_type_and_impl_send_sync! { /// A certificate store to hold trusted `X509` certificates. pub struct X509Store; - /// Reference to an `X509Store`. - pub struct X509StoreRef; } impl X509StoreRef { diff --git a/boring/src/x509/verify.rs b/boring/src/x509/verify.rs index 3b66fd34..43249100 100644 --- a/boring/src/x509/verify.rs +++ b/boring/src/x509/verify.rs @@ -27,8 +27,6 @@ foreign_type_and_impl_send_sync! { /// Adjust parameters associated with certificate verification. pub struct X509VerifyParam; - /// Reference to `X509VerifyParam`. - pub struct X509VerifyParamRef; } impl X509VerifyParamRef {