test and fix behaviors of some of the layout components

This commit is contained in:
🪞👃🪞 2024-09-12 17:05:08 +03:00
parent aaedede796
commit 11ecf669a1
4 changed files with 137 additions and 56 deletions

View file

@ -16,7 +16,7 @@ pub(crate) use std::thread::{spawn, JoinHandle};
pub(crate) use std::time::Duration;
pub(crate) use atomic_float::*;
use better_panic::{Settings, Verbosity};
use std::ops::{Add, Sub, Div};
use std::ops::{Add, Sub, Mul, Div};
use std::cmp::{Ord, Eq, PartialEq};
use std::fmt::{Debug, Display};
@ -49,6 +49,7 @@ pub type Perhaps<T> = Result<Option<T>, Box<dyn Error>>;
pub trait Number: Send + Sync + Copy
+ Add<Self, Output=Self>
+ Sub<Self, Output=Self>
+ Mul<Self, Output=Self>
+ Div<Self, Output=Self>
+ Ord + PartialEq + Eq
+ Debug + Display {}
@ -57,6 +58,7 @@ impl<T> Number for T where
T: Send + Sync + Copy
+ Add<Self, Output=Self>
+ Sub<Self, Output=Self>
+ Mul<Self, Output=Self>
+ Div<Self, Output=Self>
+ Ord + PartialEq + Eq
+ Debug + Display