Skip to content

Commit dfcb9f9

Browse files
author
Ian
committed
Added default for numeric ops
1 parent 51cbf2a commit dfcb9f9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

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.4.0"
3+
version = "0.5.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ use num_traits::{Bounded, FromPrimitive, NumCast, One, ToPrimitive, Zero};
44
use std::ops::{Add, AddAssign, MulAssign, SubAssign};
55

66
pub trait NumericOps:
7-
Zero + One + NumCast + Copy + AddAssign + MulAssign + SubAssign + PartialOrd + Bounded + Add<Output = Self> + Sum + Debug
7+
Zero + One + NumCast + Copy + AddAssign + MulAssign + SubAssign + PartialOrd + Bounded + Add<Output = Self> + Sum + Debug + Default
88
{
99
}
1010
impl<
11-
T: Zero + One + NumCast + Copy + AddAssign + MulAssign + SubAssign + PartialOrd + Bounded + Add<Output = Self> + Sum + Debug,
11+
T: Zero + One + NumCast + Copy + AddAssign + MulAssign + SubAssign + PartialOrd + Bounded + Add<Output = Self> + Sum + Debug + Default,
1212
> NumericOps for T
1313
{
1414
}

0 commit comments

Comments
 (0)