summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Platte <jplatte+git@posteo.de>2020-12-31 19:45:38 +0100
committerJonas Platte <jplatte+git@posteo.de>2021-01-01 04:11:48 +0100
commitc13d0a21077127fbd4e2a84a2c8ec9830f0f3147 (patch)
tree995fcdd2e98ec890bc23d0c2f785928a98a62ab4
parent0dc50fbfd45cbb84418a83dd4522f02b0b538f19 (diff)
downloadrust-openssl-c13d0a21077127fbd4e2a84a2c8ec9830f0f3147.zip
Use edition 2018 idioms and warn when they are not followed
This was mostly automated using `cargo fix --edition-idioms`.
-rw-r--r--openssl/examples/mk_certs.rs2
-rw-r--r--openssl/src/asn1.rs12
-rw-r--r--openssl/src/bn.rs8
-rw-r--r--openssl/src/dsa.rs2
-rw-r--r--openssl/src/ec.rs2
-rw-r--r--openssl/src/error.rs6
-rw-r--r--openssl/src/hash.rs2
-rw-r--r--openssl/src/lib.rs6
-rw-r--r--openssl/src/pkcs12.rs4
-rw-r--r--openssl/src/pkcs5.rs2
-rw-r--r--openssl/src/pkey.rs2
-rw-r--r--openssl/src/rsa.rs2
-rw-r--r--openssl/src/sha.rs2
-rw-r--r--openssl/src/ssl/error.rs4
-rw-r--r--openssl/src/ssl/mod.rs8
-rw-r--r--openssl/src/ssl/test/mod.rs3
-rw-r--r--openssl/src/stack.rs13
-rw-r--r--openssl/src/string.rs8
-rw-r--r--openssl/src/x509/extension.rs6
-rw-r--r--openssl/src/x509/mod.rs16
-rw-r--r--systest/src/main.rs3
21 files changed, 48 insertions, 65 deletions
diff --git a/openssl/examples/mk_certs.rs b/openssl/examples/mk_certs.rs
index 5c9ec682..849cc4d2 100644
--- a/openssl/examples/mk_certs.rs
+++ b/openssl/examples/mk_certs.rs
@@ -1,8 +1,6 @@
//! A program that generates ca certs, certs verified by the ca, and public
//! and private keys.
-extern crate openssl;
-
use openssl::asn1::Asn1Time;
use openssl::bn::{BigNum, MsbOption};
use openssl::error::ErrorStack;
diff --git a/openssl/src/asn1.rs b/openssl/src/asn1.rs
index 69f2026a..758a5d9d 100644
--- a/openssl/src/asn1.rs
+++ b/openssl/src/asn1.rs
@@ -65,7 +65,7 @@ foreign_type_and_impl_send_sync! {
}
impl fmt::Display for Asn1GeneralizedTimeRef {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
unsafe {
let mem_bio = match MemBio::new() {
Err(_) => return f.write_str("error"),
@@ -284,7 +284,7 @@ impl<'a> PartialOrd<Asn1Time> for &'a Asn1TimeRef {
}
impl fmt::Display for Asn1TimeRef {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
unsafe {
let mem_bio = match MemBio::new() {
Err(_) => return f.write_str("error"),
@@ -300,7 +300,7 @@ impl fmt::Display for Asn1TimeRef {
}
impl fmt::Debug for Asn1TimeRef {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.to_string())
}
}
@@ -481,7 +481,7 @@ impl Asn1StringRef {
}
impl fmt::Debug for Asn1StringRef {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.as_utf8() {
Ok(openssl_string) => openssl_string.fmt(fmt),
Err(_) => fmt.write_str("error"),
@@ -636,7 +636,7 @@ impl Asn1ObjectRef {
}
impl fmt::Display for Asn1ObjectRef {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
unsafe {
let mut buf = [0; 80];
let len = ffi::OBJ_obj2txt(
@@ -654,7 +654,7 @@ impl fmt::Display for Asn1ObjectRef {
}
impl fmt::Debug for Asn1ObjectRef {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.write_str(self.to_string().as_str())
}
}
diff --git a/openssl/src/bn.rs b/openssl/src/bn.rs
index 4371e741..7a5484e3 100644
--- a/openssl/src/bn.rs
+++ b/openssl/src/bn.rs
@@ -1122,7 +1122,7 @@ impl BigNum {
}
impl fmt::Debug for BigNumRef {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.to_dec_str() {
Ok(s) => f.write_str(&s),
Err(e) => Err(e.into()),
@@ -1131,7 +1131,7 @@ impl fmt::Debug for BigNumRef {
}
impl fmt::Debug for BigNum {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.to_dec_str() {
Ok(s) => f.write_str(&s),
Err(e) => Err(e.into()),
@@ -1140,7 +1140,7 @@ impl fmt::Debug for BigNum {
}
impl fmt::Display for BigNumRef {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.to_dec_str() {
Ok(s) => f.write_str(&s),
Err(e) => Err(e.into()),
@@ -1149,7 +1149,7 @@ impl fmt::Display for BigNumRef {
}
impl fmt::Display for BigNum {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.to_dec_str() {
Ok(s) => f.write_str(&s),
Err(e) => Err(e.into()),
diff --git a/openssl/src/dsa.rs b/openssl/src/dsa.rs
index c58c6486..11fece79 100644
--- a/openssl/src/dsa.rs
+++ b/openssl/src/dsa.rs
@@ -288,7 +288,7 @@ impl Dsa<Public> {
}
impl<T> fmt::Debug for Dsa<T> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "DSA")
}
}
diff --git a/openssl/src/ec.rs b/openssl/src/ec.rs
index f43c8d3d..8218d65e 100644
--- a/openssl/src/ec.rs
+++ b/openssl/src/ec.rs
@@ -915,7 +915,7 @@ impl<T> Clone for EcKey<T> {
}
impl<T> fmt::Debug for EcKey<T> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "EcKey")
}
}
diff --git a/openssl/src/error.rs b/openssl/src/error.rs
index 55567e2b..0fc5d015 100644
--- a/openssl/src/error.rs
+++ b/openssl/src/error.rs
@@ -58,7 +58,7 @@ impl ErrorStack {
}
impl fmt::Display for ErrorStack {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
if self.0.is_empty() {
return fmt.write_str("OpenSSL error");
}
@@ -236,7 +236,7 @@ impl Error {
}
impl fmt::Debug for Error {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut builder = fmt.debug_struct("Error");
builder.field("code", &self.code());
if let Some(library) = self.library() {
@@ -258,7 +258,7 @@ impl fmt::Debug for Error {
}
impl fmt::Display for Error {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(fmt, "error:{:08X}", self.code())?;
match self.library() {
Some(l) => write!(fmt, ":{}", l)?,
diff --git a/openssl/src/hash.rs b/openssl/src/hash.rs
index c5c39a08..05f81019 100644
--- a/openssl/src/hash.rs
+++ b/openssl/src/hash.rs
@@ -390,7 +390,7 @@ impl AsRef<[u8]> for DigestBytes {
}
impl fmt::Debug for DigestBytes {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&**self, fmt)
}
}
diff --git a/openssl/src/lib.rs b/openssl/src/lib.rs
index 05c3eb8c..ca2cfc52 100644
--- a/openssl/src/lib.rs
+++ b/openssl/src/lib.rs
@@ -109,6 +109,7 @@
//! ctx.set_ciphersuites("TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256").unwrap();
//! ```
#![doc(html_root_url = "https://docs.rs/openssl/0.10")]
+#![warn(rust_2018_idioms)]
#[macro_use]
extern crate bitflags;
@@ -116,14 +117,11 @@ extern crate bitflags;
extern crate cfg_if;
#[macro_use]
extern crate foreign_types;
-extern crate libc;
-extern crate once_cell;
+
extern crate openssl_sys as ffi;
#[cfg(test)]
extern crate hex;
-#[cfg(test)]
-extern crate tempdir;
#[doc(inline)]
pub use ffi::init;
diff --git a/openssl/src/pkcs12.rs b/openssl/src/pkcs12.rs
index b2764786..4e61d291 100644
--- a/openssl/src/pkcs12.rs
+++ b/openssl/src/pkcs12.rs
@@ -197,10 +197,8 @@ impl Pkcs12Builder {
#[cfg(test)]
mod test {
- use crate::hash::MessageDigest;
- use hex;
-
use crate::asn1::Asn1Time;
+ use crate::hash::MessageDigest;
use crate::nid::Nid;
use crate::pkey::PKey;
use crate::rsa::Rsa;
diff --git a/openssl/src/pkcs5.rs b/openssl/src/pkcs5.rs
index 6cc9609c..370db4da 100644
--- a/openssl/src/pkcs5.rs
+++ b/openssl/src/pkcs5.rs
@@ -281,8 +281,6 @@ mod tests {
#[test]
#[cfg(any(ossl110))]
fn scrypt() {
- use hex;
-
let pass = "pleaseletmein";
let salt = "SodiumChloride";
let expected =
diff --git a/openssl/src/pkey.rs b/openssl/src/pkey.rs
index dcf941af..8c9c6999 100644
--- a/openssl/src/pkey.rs
+++ b/openssl/src/pkey.rs
@@ -292,7 +292,7 @@ where
}
impl<T> fmt::Debug for PKey<T> {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
let alg = match self.id() {
Id::RSA => "RSA",
Id::HMAC => "HMAC",
diff --git a/openssl/src/rsa.rs b/openssl/src/rsa.rs
index 446da6ab..8ff9965e 100644
--- a/openssl/src/rsa.rs
+++ b/openssl/src/rsa.rs
@@ -651,7 +651,7 @@ impl Rsa<Private> {
}
impl<T> fmt::Debug for Rsa<T> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Rsa")
}
}
diff --git a/openssl/src/sha.rs b/openssl/src/sha.rs
index d6e69385..232ad856 100644
--- a/openssl/src/sha.rs
+++ b/openssl/src/sha.rs
@@ -341,8 +341,6 @@ impl Sha512 {
#[cfg(test)]
mod test {
- use hex;
-
use super::*;
#[test]
diff --git a/openssl/src/ssl/error.rs b/openssl/src/ssl/error.rs
index 06cbb35e..5ec3e56a 100644
--- a/openssl/src/ssl/error.rs
+++ b/openssl/src/ssl/error.rs
@@ -99,7 +99,7 @@ impl From<ErrorStack> for Error {
}
impl fmt::Display for Error {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.code {
ErrorCode::ZERO_RETURN => fmt.write_str("the SSL session has been shut down"),
ErrorCode::WANT_READ => match self.io_error() {
@@ -157,7 +157,7 @@ impl<S: fmt::Debug> StdError for HandshakeError<S> {
}
impl<S: fmt::Debug> fmt::Display for HandshakeError<S> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
HandshakeError::SetupFailure(ref e) => write!(f, "stream setup failed: {}", e)?,
HandshakeError::Failure(ref s) => {
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 93a3bf0a..2328106c 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1843,7 +1843,7 @@ impl ToOwned for SslContextRef {
// TODO: add useful info here
impl fmt::Debug for SslContext {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(fmt, "SslContext")
}
}
@@ -2346,7 +2346,7 @@ foreign_type_and_impl_send_sync! {
}
impl fmt::Debug for Ssl {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&**self, fmt)
}
}
@@ -2441,7 +2441,7 @@ impl Ssl {
}
impl fmt::Debug for SslRef {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_struct("Ssl")
.field("state", &self.state_string_long())
.field("verify_result", &self.verify_result())
@@ -3469,7 +3469,7 @@ impl<S> fmt::Debug for SslStream<S>
where
S: fmt::Debug,
{
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_struct("SslStream")
.field("stream", &self.get_ref())
.field("ssl", &self.ssl())
diff --git a/openssl/src/ssl/test/mod.rs b/openssl/src/ssl/test/mod.rs
index e145d22b..8d350224 100644
--- a/openssl/src/ssl/test/mod.rs
+++ b/openssl/src/ssl/test/mod.rs
@@ -1,6 +1,5 @@
#![allow(unused_imports)]
-use hex;
use std::env;
use std::fs::File;
use std::io::prelude::*;
@@ -1196,7 +1195,7 @@ fn stateless() {
self.incoming.get_mut().extend_from_slice(data);
}
- pub fn take_outgoing(&mut self) -> Outgoing {
+ pub fn take_outgoing(&mut self) -> Outgoing<'_> {
Outgoing(&mut self.outgoing)
}
}
diff --git a/openssl/src/stack.rs b/openssl/src/stack.rs
index b412029b..e5f32c77 100644
--- a/openssl/src/stack.rs
+++ b/openssl/src/stack.rs
@@ -50,7 +50,7 @@ where
T: Stackable,
T::Ref: fmt::Debug,
{
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_list().entries(self).finish()
}
}
@@ -199,14 +199,14 @@ impl<T: Stackable> StackRef<T> {
self.len() == 0
}
- pub fn iter(&self) -> Iter<T> {
+ pub fn iter(&self) -> Iter<'_, T> {
Iter {
stack: self,
idxs: 0..self.len() as c_int,
}
}
- pub fn iter_mut(&mut self) -> IterMut<T> {
+ pub fn iter_mut(&mut self) -> IterMut<'_, T> {
IterMut {
idxs: 0..self.len() as c_int,
stack: self,
@@ -310,10 +310,7 @@ impl<'a, T: Stackable> iter::IntoIterator for &'a mut Stack<T> {
}
/// An iterator over the stack's contents.
-pub struct Iter<'a, T: Stackable>
-where
- T: 'a,
-{
+pub struct Iter<'a, T: Stackable> {
stack: &'a StackRef<T>,
idxs: Range<c_int>,
}
@@ -347,7 +344,7 @@ impl<'a, T: Stackable> DoubleEndedIterator for Iter<'a, T> {
impl<'a, T: Stackable> ExactSizeIterator for Iter<'a, T> {}
/// A mutable iterator over the stack's contents.
-pub struct IterMut<'a, T: Stackable + 'a> {
+pub struct IterMut<'a, T: Stackable> {
stack: &'a mut StackRef<T>,
idxs: Range<c_int>,
}
diff --git a/openssl/src/string.rs b/openssl/src/string.rs
index f20e8434..5dd1f1ae 100644
--- a/openssl/src/string.rs
+++ b/openssl/src/string.rs
@@ -18,13 +18,13 @@ foreign_type_and_impl_send_sync! {
}
impl fmt::Display for OpensslString {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&**self, f)
}
}
impl fmt::Debug for OpensslString {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&**self, f)
}
}
@@ -69,13 +69,13 @@ impl AsRef<[u8]> for OpensslStringRef {
}
impl fmt::Display for OpensslStringRef {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&**self, f)
}
}
impl fmt::Debug for OpensslStringRef {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&**self, f)
}
}
diff --git a/openssl/src/x509/extension.rs b/openssl/src/x509/extension.rs
index dd4899c8..efe70f2b 100644
--- a/openssl/src/x509/extension.rs
+++ b/openssl/src/x509/extension.rs
@@ -397,7 +397,7 @@ impl SubjectKeyIdentifier {
}
/// Return a `SubjectKeyIdentifier` extension as an `X509Extension`.
- pub fn build(&self, ctx: &X509v3Context) -> Result<X509Extension, ErrorStack> {
+ pub fn build(&self, ctx: &X509v3Context<'_>) -> Result<X509Extension, ErrorStack> {
let mut value = String::new();
let mut first = true;
append(&mut value, &mut first, self.critical, "critical");
@@ -449,7 +449,7 @@ impl AuthorityKeyIdentifier {
}
/// Return a `AuthorityKeyIdentifier` extension as an `X509Extension`.
- pub fn build(&self, ctx: &X509v3Context) -> Result<X509Extension, ErrorStack> {
+ pub fn build(&self, ctx: &X509v3Context<'_>) -> Result<X509Extension, ErrorStack> {
let mut value = String::new();
let mut first = true;
append(&mut value, &mut first, self.critical, "critical");
@@ -538,7 +538,7 @@ impl SubjectAlternativeName {
}
/// Return a `SubjectAlternativeName` extension as an `X509Extension`.
- pub fn build(&self, ctx: &X509v3Context) -> Result<X509Extension, ErrorStack> {
+ pub fn build(&self, ctx: &X509v3Context<'_>) -> Result<X509Extension, ErrorStack> {
let mut value = String::new();
let mut first = true;
append(&mut value, &mut first, self.critical, "critical");
diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs
index ad983fbd..b982be43 100644
--- a/openssl/src/x509/mod.rs
+++ b/openssl/src/x509/mod.rs
@@ -678,7 +678,7 @@ impl Clone for X509 {
}
impl fmt::Debug for X509 {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
let serial = match &self.serial_number().to_bn() {
Ok(bn) => match bn.to_hex_str() {
Ok(hex) => hex.to_string(),
@@ -749,7 +749,7 @@ impl X509Extension {
/// See the extension module for builder types which will construct certain common extensions.
pub fn new(
conf: Option<&ConfRef>,
- context: Option<&X509v3Context>,
+ context: Option<&X509v3Context<'_>>,
name: &str,
value: &str,
) -> Result<X509Extension, ErrorStack> {
@@ -775,7 +775,7 @@ impl X509Extension {
/// See the extension module for builder types which will construct certain common extensions.
pub fn new_nid(
conf: Option<&ConfRef>,
- context: Option<&X509v3Context>,
+ context: Option<&X509v3Context<'_>>,
name: Nid,
value: &str,
) -> Result<X509Extension, ErrorStack> {
@@ -956,7 +956,7 @@ impl X509NameRef {
}
impl fmt::Debug for X509NameRef {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.debug_list().entries(self.entries()).finish()
}
}
@@ -1036,7 +1036,7 @@ impl X509NameEntryRef {
}
impl fmt::Debug for X509NameEntryRef {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_fmt(format_args!("{:?} = {:?}", self.object(), self.data()))
}
}
@@ -1283,7 +1283,7 @@ impl X509ReqRef {
pub struct X509VerifyResult(c_int);
impl fmt::Debug for X509VerifyResult {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_struct("X509VerifyResult")
.field("code", &self.0)
.field("error", &self.error_string())
@@ -1292,7 +1292,7 @@ impl fmt::Debug for X509VerifyResult {
}
impl fmt::Display for X509VerifyResult {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.write_str(self.error_string())
}
}
@@ -1397,7 +1397,7 @@ impl GeneralNameRef {
}
impl fmt::Debug for GeneralNameRef {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
if let Some(email) = self.email() {
formatter.write_str(email)
} else if let Some(dnsname) = self.dnsname() {
diff --git a/systest/src/main.rs b/systest/src/main.rs
index 3e5888c8..cbfa3da6 100644
--- a/systest/src/main.rs
+++ b/systest/src/main.rs
@@ -1,8 +1,5 @@
#![allow(bad_style, clippy::all)]
-extern crate libc;
-extern crate openssl_sys;
-
use libc::*;
use openssl_sys::*;