mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 23:27:51 +00:00
Fix clippy warnings
This commit is contained in:
parent
b0f985c687
commit
c5d11f220e
5 changed files with 24 additions and 35 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue