Skip to content

Commit 4a21c75

Browse files
author
Ian
committed
Added float core for implementation, version bump
1 parent dfcb9f9 commit 4a21c75

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "single-utilities"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
edition = "2024"
55
description = "This crate provdes types, traits and utility functions to the single-rust ecosystem that can be universally used. You can also use it within your own ecosystem 👀"
66
homepage = "https://singlerust.com"

src/traits/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::fmt::Debug;
22
use std::iter::Sum;
33
use num_traits::{Bounded, FromPrimitive, NumCast, One, ToPrimitive, Zero};
44
use std::ops::{Add, AddAssign, MulAssign, SubAssign};
5+
use num_traits::float::FloatCore;
56

67
pub trait NumericOps:
78
Zero + One + NumCast + Copy + AddAssign + MulAssign + SubAssign + PartialOrd + Bounded + Add<Output = Self> + Sum + Debug + Default
@@ -17,9 +18,9 @@ pub trait NumericOpsTS: NumericOps + Send + Sync {}
1718

1819
impl<T: NumericOps + Send + Sync> NumericOpsTS for T {}
1920

20-
pub trait FloatOps: NumericOps + num_traits::Float + FromPrimitive + ToPrimitive {}
21+
pub trait FloatOps: NumericOps + num_traits::Float + FromPrimitive + ToPrimitive + FloatCore {}
2122

22-
impl<T: NumericOps + num_traits::Float + FromPrimitive + ToPrimitive> FloatOps for T {}
23+
impl<T: NumericOps + num_traits::Float + FromPrimitive + ToPrimitive + FloatCore> FloatOps for T {}
2324

2425
pub trait FloatOpsTS: FloatOps + Sync + Send {}
2526

0 commit comments

Comments
 (0)