Use less precision when comparing vaue in slint language

In rust, use f32 instead of f64 for arithmetic comparison.
In the interpreter, use approx_eq

The test is failling in nightly because of precision change in `log`.
By using f32, it actually should work

Also Revert "Disable builds with nightly Rust temporarily"
This reverts commit 4afc3a2e84.

Fixes #5722
This commit is contained in:
Olivier Goffart 2024-08-08 13:05:16 +02:00
parent e4cb55bb4f
commit 4622025969
3 changed files with 5 additions and 5 deletions

View file

@ -2184,7 +2184,7 @@ fn compile_expression(expr: &Expression, ctx: &EvaluationContext) -> TokenStream
| Type::Rem
) =>
{
(Some(quote!(as f64)), Some(quote!(as f64)))
(Some(quote!(as f32)), Some(quote!(as f32)))
}
_ => (None, None),
};