From 602bb6d63d3a0ed7d964502c42082bb992f1c874 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Fri, 6 Oct 2023 09:43:46 +0200 Subject: [PATCH] Fix clippy lints --- boring/src/bn.rs | 2 +- hyper-boring/src/cache.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/boring/src/bn.rs b/boring/src/bn.rs index 9481d8d3..6ad25782 100644 --- a/boring/src/bn.rs +++ b/boring/src/bn.rs @@ -1082,7 +1082,7 @@ impl Ord for BigNumRef { impl PartialOrd for BigNum { fn partial_cmp(&self, oth: &BigNum) -> Option { - self.deref().partial_cmp(oth.deref()) + Some(self.cmp(oth)) } } diff --git a/hyper-boring/src/cache.rs b/hyper-boring/src/cache.rs index f750c0f2..7983d321 100644 --- a/hyper-boring/src/cache.rs +++ b/hyper-boring/src/cache.rs @@ -55,8 +55,9 @@ impl SessionCache { self.sessions .entry(key.clone()) - .or_insert_with(LinkedHashSet::new) + .or_default() .insert(session.clone()); + self.reverse.insert(session, key); }