Skip to content

Commit 32a83d6

Browse files
author
Ian
committed
Added hash trait. bumped version
1 parent e8626bf commit 32a83d6

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "single-utilities"
3-
version = "0.8.5"
3+
version = "0.8.6"
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"
@@ -14,4 +14,4 @@ simd = ["dep:simba"]
1414

1515
[dependencies]
1616
num-traits = "0.2.19"
17-
simba = { version = "0.9.0", optional = true }
17+
simba = { version = "0.9.1", optional = true }

src/traits/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use num_traits::{Bounded, FromPrimitive, NumCast, One, ToPrimitive, Unsigned, Ze
33
#[cfg(feature = "simd")]
44
use simba::{scalar::RealField, simd::SimdRealField};
55
use std::fmt::Debug;
6+
use std::hash::Hash;
67
use std::iter::Sum;
78
use std::ops::{Add, AddAssign, MulAssign, SubAssign};
89

@@ -134,11 +135,11 @@ impl<T: Default + Clone> ZeroVec for Vec<T> {
134135
/// types that can be safely used as array or vector indices while providing
135136
/// mathematical operations and bounds checking.
136137
pub trait UIndex:
137-
Unsigned + Zero + One + Copy + Eq + Ord + PartialOrd + From<usize> + Into<usize> + Bounded
138+
Unsigned + Zero + One + Copy + Eq + Ord + PartialOrd + From<usize> + Into<usize> + Bounded + Hash
138139
{
139140
}
140141

141-
impl<I: Unsigned + Zero + One + Copy + Eq + Ord + PartialOrd + From<usize> + Into<usize> + Bounded>
142+
impl<I: Unsigned + Zero + One + Copy + Eq + Ord + PartialOrd + From<usize> + Into<usize> + Bounded + Hash>
142143
UIndex for I
143144
{
144145
}

0 commit comments

Comments
 (0)