1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

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

* 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.

* Closes <https://github.com/emilk/egui/issues/3419>.
This commit is contained in:
Phen-Ro
2023-11-10 15:36:51 -05:00
committed by GitHub
parent 5201c04512
commit 5f4046d68a
6 changed files with 44 additions and 15 deletions

View File

@@ -387,14 +387,6 @@ mod tests {
let _b = two.lock();
}
#[test]
#[should_panic]
fn lock_reentry_single_thread() {
let one = Mutex::new(());
let _a = one.lock();
let _a2 = one.lock(); // panics
}
#[test]
fn lock_multiple_threads() {
use std::sync::Arc;