qbt-clean 0.3.0

Automated rules-based cleaning of qBittorrent torrents.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Copy,Clone,Debug,PartialOrd)]
pub struct F64Ord(pub f64);

impl PartialEq for F64Ord {
	fn eq(&self, that: &Self) -> bool {
		self.cmp(that) == std::cmp::Ordering::Equal
	}
}

impl Eq for F64Ord {}

impl Ord for F64Ord {
	fn cmp(&self, that: &Self) -> std::cmp::Ordering {
		self.0.partial_cmp(&that.0).expect("float is NaN")
	}
}