Skip to content

Commit 51cbf2a

Browse files
author
Ian
committed
Added Subassign and Debug to prim int and float type
1 parent 9e52b18 commit 51cbf2a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.3.0"
3+
version = "0.4.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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
use std::fmt::Debug;
12
use std::iter::Sum;
23
use num_traits::{Bounded, FromPrimitive, NumCast, One, ToPrimitive, Zero};
3-
use std::ops::{Add, AddAssign, MulAssign};
4+
use std::ops::{Add, AddAssign, MulAssign, SubAssign};
45

56
pub trait NumericOps:
6-
Zero + One + NumCast + Copy + AddAssign + MulAssign + PartialOrd + Bounded + Add<Output = Self> + Sum
7+
Zero + One + NumCast + Copy + AddAssign + MulAssign + SubAssign + PartialOrd + Bounded + Add<Output = Self> + Sum + Debug
78
{
89
}
910
impl<
10-
T: Zero + One + NumCast + Copy + AddAssign + MulAssign + PartialOrd + Bounded + Add<Output = Self> + Sum,
11+
T: Zero + One + NumCast + Copy + AddAssign + MulAssign + SubAssign + PartialOrd + Bounded + Add<Output = Self> + Sum + Debug,
1112
> NumericOps for T
1213
{
1314
}

0 commit comments

Comments
 (0)