rust-lang/rust-clippy
Ver no GitHubExpand float_cmp to structs with PartialEq
Open
#1.685 aberto em 17 de abr. de 2017
C-enhancementL-correctnessT-middlegood first issue
Métricas do repositório
- Stars
- (10.406 stars)
- Métricas de merge de PR
- (Mesclagem média 19d 22h) (113 fundiu PRs em 30d)
Description
Example:
#[derive(PartialEq)]
struct Data {
v: f64,
}
fn main() {
let d1 = Data { v: 1.0 };
let d2 = Data { v: 2.0 };
// here should be a warning
println!("{}", d1 == d2);
}