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

Use impl Into<Stroke> as argument in a few more places #3420

Merged
merged 3 commits into from
Nov 10, 2023
Merged

Use impl Into<Stroke> as argument in a few more places #3420

merged 3 commits into from
Nov 10, 2023

Conversation

Phen-Ro
Copy link
Contributor

@Phen-Ro Phen-Ro commented Sep 30, 2023

  • Functions that take Stroke were updated to take Into to make them consistent with other Into parameters.

  • Vec2 implements DivAssign, to make it consistent with already implementing MulAssign and Div.

  • Vec2::angled() uses sin_cos() rather than an individual sin() and cos() call for an immeasurable but hypothetical performance improvement.

  • Disable the lock_reentry_single_thread() mutex test. Lock()ing twice on the same thread is not guaranteed to panic.

  • Closes Some minor rough edges around Painter and Vec2 API #3419.

* Functions that take Stroke were updated to take Into<Stroke> to make them consistent with other Into<Stroke> parameters.
* Vec2 implements DivAssign<f32>, to make it consistent with already implementing MulAssign<f32> and Div<f32>.
* Vec2::angled() uses sin_cos() rather than an individual sin() and cos() call for an immeasurable but hypothetical performance improvement.
* Disable the lock_reentry_single_thread() mutex test.  Lock()ing twice on the same thread is not guaranteed to panic.
@Phen-Ro
Copy link
Contributor Author

Phen-Ro commented Sep 30, 2023

I was unable to complete scripts/check.sh because the winit crate failed with "The platform you're compiling for is not supported by winit". I hope you don't mind that I'll move this PR to ready anyway.

@Phen-Ro Phen-Ro marked this pull request as ready for review September 30, 2023 19:46
@Phen-Ro
Copy link
Contributor Author

Phen-Ro commented Sep 30, 2023

In particular, these were the lines that failed complaining about winit platform support:
(cd crates/eframe && cargo check --no-default-features --features "wgpu")
(cd crates/egui_demo_app && cargo check --no-default-features --features "wgpu")
(cd crates/egui_glow && cargo check --all-features)

Everything else passed.

crates/epaint/src/mutex.rs Outdated Show resolved Hide resolved
@emilk emilk changed the title Minor changes for #3419 Use impl Into<Stroke> as argument in a few more places Nov 10, 2023
@emilk emilk added the epaint label Nov 10, 2023
@Phen-Ro
Copy link
Contributor Author

Phen-Ro commented Nov 10, 2023

Merge conflict resolved and mutex test removed.

@emilk emilk merged commit 5f4046d into emilk:master Nov 10, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some minor rough edges around Painter and Vec2 API
2 participants