Fix clippy warnings

This commit is contained in:
Matthew Esposito 2023-12-26 18:27:25 -05:00
parent b0f985c687
commit c5d11f220e
No known key found for this signature in database
5 changed files with 24 additions and 35 deletions

View file

@ -353,14 +353,6 @@ fn determine_compressor(accept_encoding: String) -> Option<CompressionType> {
impl PartialOrd for CompressorCandidate {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
// Guard against NAN, both on our end and on the other.
if self.q.is_nan() || other.q.is_nan() {
return None;
};
// f64 and CompressionType are ordered, except in the case
// where the f64 is NAN (which we checked against), so we
// can safely return a Some here.
Some(self.cmp(other))
}
}