diff --git a/Cargo.lock b/Cargo.lock index 3c96b9f..93015e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,9 +33,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.16.2" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a054912289d18629dc78375ba2c3726a3afe3ff71b4edba9dedfca0e3446d1fc" +checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f" dependencies = [ "aws-lc-fips-sys", "aws-lc-sys", @@ -44,9 +44,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.39.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a25cf98105baa966497416dbd42565ce3a8cf8dbfd59803ec9ad46f3126399" +checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7" dependencies = [ "cc", "cmake", @@ -356,7 +356,7 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.9" +version = "0.27.10" dependencies = [ "cfg-if", "http", @@ -644,9 +644,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.38" +version = "0.23.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +checksum = "7c2c118cb077cca2822033836dfb1b975355dfb784b5e8da48f7b6c5db74e60e" dependencies = [ "aws-lc-rs", "log", @@ -708,9 +708,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.12" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "aws-lc-rs", "ring", @@ -848,9 +848,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.51.1" +version = "1.52.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes", "libc", @@ -965,18 +965,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ "wit-bindgen", ] [[package]] name = "webpki-root-certs" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" +checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c" dependencies = [ "rustls-pki-types", ] @@ -1089,9 +1089,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "wit-bindgen" -version = "0.51.0" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "zeroize" diff --git a/Cargo.toml b/Cargo.toml index 79061cd..659cb48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hyper-rustls" -version = "0.27.9" +version = "0.27.10" edition = "2021" rust-version = "1.85" license = "Apache-2.0 OR ISC OR MIT" @@ -53,6 +53,26 @@ name = "server" path = "examples/server.rs" required-features = ["aws-lc-rs"] +[lints.clippy] +cloned_instead_of_copied = "warn" +manual_let_else = "warn" +needless_collect = "warn" +needless_pass_by_ref_mut = "warn" +or_fun_call = "warn" +redundant_clone = "warn" +upper_case_acronyms = "warn" +use_self = "warn" + +[lints.rust] +elided_lifetimes_in_paths = "warn" +trivial_numeric_casts = "warn" +unexpected_cfgs = { level = "warn", check-cfg = ["cfg(hyper_rustls_docsrs)"] } +unnameable_types = "warn" +unreachable_pub = "warn" +unused_extern_crates = "warn" +unused_import_braces = "warn" +unused_qualifications = "warn" + [package.metadata.docs.rs] no-default-features = true features = [ @@ -65,4 +85,4 @@ features = [ "tls12", "webpki-tokio", ] -rustdoc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "hyper_rustls_docsrs"] diff --git a/src/config.rs b/src/config.rs index db911b7..8c77647 100644 --- a/src/config.rs +++ b/src/config.rs @@ -128,6 +128,7 @@ impl ConfigBuilderExt for ConfigBuilder { mod sealed { use super::*; + #[expect(unnameable_types)] pub trait Sealed {} impl Sealed for ConfigBuilder {} diff --git a/src/connector.rs b/src/connector.rs index d19fdf9..9e3e58d 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -138,7 +138,7 @@ where } impl fmt::Debug for HttpsConnector { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("HttpsConnector") .field("force_https", &self.force_https) .finish() diff --git a/src/connector/builder.rs b/src/connector/builder.rs index 259b3f1..1b4a825 100644 --- a/src/connector/builder.rs +++ b/src/connector/builder.rs @@ -229,7 +229,7 @@ impl WantsProtocols1 { HttpsConnector { force_https: self.https_only, http: conn, - tls_config: std::sync::Arc::new(self.tls_config), + tls_config: Arc::new(self.tls_config), server_name_resolver: self .server_name_resolver .unwrap_or_else(|| Arc::new(DefaultServerNameResolver::default())), diff --git a/src/lib.rs b/src/lib.rs index 89e355a..0b11298 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,8 +32,8 @@ //! # fn main() {} //! ``` -#![warn(missing_docs, unreachable_pub, clippy::use_self)] -#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![warn(missing_docs)] +#![cfg_attr(hyper_rustls_docsrs, feature(doc_cfg))] mod config; mod connector; diff --git a/src/stream.rs b/src/stream.rs index f08e7b1..538aa29 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -36,7 +36,7 @@ impl Connection for MaybeHttpsStre } impl fmt::Debug for MaybeHttpsStream { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { Self::Http(..) => f.pad("Http(..)"), Self::Https(..) => f.pad("Https(..)"), @@ -60,7 +60,7 @@ impl rt::Read for MaybeHttpsStream { #[inline] fn poll_read( self: Pin<&mut Self>, - cx: &mut Context, + cx: &mut Context<'_>, buf: rt::ReadBufCursor<'_>, ) -> Poll> { match Pin::get_mut(self) {