mirror of
https://github.com/nushell/nushell
synced 2024-12-27 13:33:16 +00:00
Fix some machine epsilon warnings
This commit is contained in:
parent
7b2116dc29
commit
19301751ee
2 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ mod tests {
|
|||
match (&lhs.expr, &rhs.expr) {
|
||||
(Expr::Bool(a), Expr::Bool(b)) => assert_eq!(a, b),
|
||||
(Expr::Int(a), Expr::Int(b)) => assert_eq!(a, b),
|
||||
(Expr::Float(a), Expr::Float(b)) => assert_eq!(a, b),
|
||||
(Expr::Float(a), Expr::Float(b)) => assert!((a - b).abs() < f64::EPSILON),
|
||||
(Expr::String(a), Expr::String(b)) => assert_eq!(a, b),
|
||||
_ => panic!("not matching values"),
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ mod tests {
|
|||
match (&lhs.expr, &rhs.expr) {
|
||||
(Expr::Bool(a), Expr::Bool(b)) => assert_eq!(a, b),
|
||||
(Expr::Int(a), Expr::Int(b)) => assert_eq!(a, b),
|
||||
(Expr::Float(a), Expr::Float(b)) => assert_eq!(a, b),
|
||||
(Expr::Float(a), Expr::Float(b)) => assert!((a - b).abs() < f64::EPSILON),
|
||||
(Expr::String(a), Expr::String(b)) => assert_eq!(a, b),
|
||||
_ => panic!("not matching values"),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue