mirror of https://github.com/ctz/rustls
tls13: fix clippy::unnecessary_lazy_evaluations finding
``` error: unnecessary closure used with `bool::then` --> rustls/src/tls13/mod.rs:87:9 | 87 | (prev.hash_algorithm() == self.hash_algorithm()).then(|| prev) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------- | | | help: use `then_some(..)` instead: `then_some(prev)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations = note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_lazy_evaluations)]` ```
This commit is contained in:
parent
6da53375a2
commit
6fd691a101
|
@ -84,7 +84,7 @@ impl Tls13CipherSuite {
|
|||
|
||||
/// Can a session using suite self resume from suite prev?
|
||||
pub fn can_resume_from(&self, prev: &'static Self) -> Option<&'static Self> {
|
||||
(prev.hash_algorithm() == self.hash_algorithm()).then(|| prev)
|
||||
(prev.hash_algorithm() == self.hash_algorithm()).then_some(prev)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue