1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-15 22:05:51 +02:00

Merge pull request from nushell/epsilon

Fix some machine epsilon warnings
This commit is contained in:
JT
2021-11-02 19:53:12 +13:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
crates/nu-plugin/src

@ -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"),
}