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); }