Skip to content
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

janitor: Some clippy fixes #2069

Merged
merged 2 commits into from Jan 16, 2023
Merged

janitor: Some clippy fixes #2069

merged 2 commits into from Jan 16, 2023

Conversation

hunger
Copy link
Member

@hunger hunger commented Jan 16, 2023

No description provided.

if to_distribute <= 0. || max_grow <= 0. {
return Some(());
}

let grow = if total_stretch <= 0. {
to_distribute
/ (data.iter().filter(|it| A::can_grow(it) > 0 as _).count() as Coord) as f32
to_distribute / (data.iter().filter(|it| A::can_grow(it) > 0 as _).count() as Coord)
Copy link
Member

Choose a reason for hiding this comment

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

the thing is that Coord can be f32 or i32 depending on the compile option, so lots of conversion are actually necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Very good point indeed, I'll just drop that for now. I do want the errors out of the way though.

These are reported as errors by clippy (nothing major IMHO), but they
stop clippy from looking at all files, so let's get them out of the way.
@hunger hunger force-pushed the clippy branch 2 times, most recently from a3a4034 to 3afa8be Compare January 16, 2023 13:06
@hunger hunger merged commit f0b4bce into slint-ui:master Jan 16, 2023
@hunger hunger deleted the clippy branch January 16, 2023 13:42
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.

None yet

2 participants