5 compile errors left

This commit is contained in:
🪞👃🪞 2024-09-07 16:44:49 +03:00
parent 7bcd40b425
commit b3f0f60400
13 changed files with 462 additions and 180 deletions

View file

@ -15,6 +15,9 @@ 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};
use std::cmp::{Ord, Eq, PartialEq};
use std::fmt::{Debug, Display};
/// Define and reexport submodules.
#[macro_export] macro_rules! submod {
@ -40,3 +43,18 @@ pub type Usually<T> = Result<T, Box<dyn Error>>;
/// Standard optional result type.
pub type Perhaps<T> = Result<Option<T>, Box<dyn Error>>;
/// Standard numeric type.
pub trait Number: Send + Sync + Copy
+ Add<Self, Output=Self>
+ Sub<Self, Output=Self>
+ Ord + PartialEq + Eq
+ Debug + Display {}
impl<T> Number for T where
T: Send + Sync + Copy
+ Add<Self, Output=Self>
+ Sub<Self, Output=Self>
+ Ord + PartialEq + Eq
+ Debug + Display
{}