Use impl Into<Stroke> as argument in a few more places#3420
Merged
emilk merged 3 commits intoemilk:masterfrom Nov 10, 2023
Phen-Ro:minor-api-improvements
Merged
Use impl Into<Stroke> as argument in a few more places#3420emilk merged 3 commits intoemilk:masterfrom Phen-Ro:minor-api-improvements
impl Into<Stroke> as argument in a few more places#3420emilk merged 3 commits intoemilk:masterfrom
Phen-Ro:minor-api-improvements
Conversation
* 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.
Contributor
Author
|
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. |
Contributor
Author
|
In particular, these were the lines that failed complaining about winit platform support: Everything else passed. |
emilk
approved these changes
Nov 10, 2023
impl Into<Stroke> as argument in a few more places
Contributor
Author
|
Merge conflict resolved and mutex test removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.