mirror of https://github.com/ctz/rustls
client/hs: ignore some aggressive clippy warnings.
This commit adds two `allow` directives for clippy warnings present when building with `--no-default-features`: 1. Ignore `clippy::unnecessary_lazy_evaluations` for `find_session`. The suggestion to use `or` instead of `or_else` to avoid unnecessary lazy evaluation breaks a unit test (`test_client_tls12_no_resume_after_server_downgrade`). 2. Ignore `clippy::bind_instead_of_map` for `handle`. The suggestion to use `map` doesn't play well with the inner `match` that has a `None` arm for TLS 1.2 feature builds.
This commit is contained in:
parent
770fefe749
commit
572992fbf6
|
@ -42,7 +42,7 @@ fn find_session(
|
|||
config: &ClientConfig,
|
||||
#[cfg(feature = "quic")] cx: &mut ClientContext<'_>,
|
||||
) -> Option<persist::Retrieved<ClientSessionValue>> {
|
||||
#[allow(clippy::let_and_return)]
|
||||
#[allow(clippy::let_and_return, clippy::unnecessary_lazy_evaluations)]
|
||||
let found = config
|
||||
.session_storage
|
||||
.take_tls13_ticket(server_name)
|
||||
|
@ -614,6 +614,7 @@ impl State<ClientConnectionData> for ExpectServerHello {
|
|||
// handshake_traffic_secret.
|
||||
match suite {
|
||||
SupportedCipherSuite::Tls13(suite) => {
|
||||
#[allow(clippy::bind_instead_of_map)]
|
||||
let resuming_session = self
|
||||
.resuming_session
|
||||
.and_then(|resuming| match resuming.value {
|
||||
|
|
Loading…
Reference in New Issue