Skip to content

Use less precision when comparing vaue in slint language #5802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

ogoffart
Copy link
Member

@ogoffart ogoffart commented Aug 8, 2024

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 4afc3a2.

Fixes #5722

@ogoffart ogoffart requested a review from tronical August 8, 2024 11:25
@@ -10,6 +10,7 @@ use i_slint_core::model::{Model, ModelRc};
#[cfg(feature = "internal")]
use i_slint_core::window::WindowInner;
use i_slint_core::{PathData, SharedVector};
use i_slint_core::graphics::euclid::approxeq::ApproxEq as _;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[formatters] reported by reviewdog 🐶

Suggested change
use i_slint_core::graphics::euclid::approxeq::ApproxEq as _;

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 4afc3a2.

Fixes #5722
@ogoffart ogoffart merged commit 4622025 into master Aug 8, 2024
1 of 32 checks passed
@ogoffart ogoffart deleted the olivier/ci3 branch August 8, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: Re-enable builds with Nightly Rust
2 participants