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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user