Skip to content

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Apr 5, 2025

@sdroege sdroege requested a review from bilelmoussaoui April 5, 2025 11:02
@sdroege sdroege force-pushed the windows-safe-io-socket branch from f12700c to 04d17cd Compare April 5, 2025 11:05
@sdroege
Copy link
Member Author

sdroege commented Apr 5, 2025

CI failure is a false positive compiler error with latest nightly...

@sdroege sdroege force-pushed the windows-safe-io-socket branch from 04d17cd to 7022a50 Compare April 5, 2025 11:38
self.to_raw_none(),
mime_type.as_ptr(),
&data_ptr,
&mut data_ptr,
Copy link
Member Author

Choose a reason for hiding this comment

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

Actually not a false positive. That code was completely broken

@sdroege sdroege force-pushed the windows-safe-io-socket branch from 87fcc32 to cfd7fef Compare April 5, 2025 15:33
@sdroege
Copy link
Member Author

sdroege commented Apr 5, 2025

CI finally passing

@sdroege sdroege merged commit 72a9cbd into gtk-rs:main Apr 6, 2025
46 of 48 checks passed
@sdroege sdroege deleted the windows-safe-io-socket branch April 6, 2025 14:26

let n_channels = if has_alpha { 4 } else { 3 };
let last_row_len = width * ((n_channels * bits_per_sample + 7) / 8);
let last_row_len = width * (n_channels * bits_per_sample).div_ceil(8);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is missing a 7 isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, why?

Copy link
Contributor

Choose a reason for hiding this comment

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

There was a +7 before and that change seemed unrelated to clippy fixes.

Copy link
Member Author

Choose a reason for hiding this comment

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

That (x + 7) / 8 is the same as dividing by 8 and rounding up (which is what div_ceil() does)

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.

2 participants