mirror of
https://github.com/bevyengine/bevy
synced 2024-11-29 08:00:20 +00:00
derive Debug, Clone for FixedState (StableAHash) (#2694)
This matches `ahash::RandomState`, which provides both `Debug` and `Clone`. Notably, implementing `Clone` allows the `StableHashMap`/`Set` to also implement `Clone`. # Objective - Allow `bevy_utils::StableHashMap` to be cloned. ## Solution - Derive `Clone` for `bevy_utils::FixedState`. - Also derive `Debug`, since we're touching it anyway, and this aligns `FixedState` with `ahash::RandomState`.
This commit is contained in:
parent
62e4e59a86
commit
481fa3c7a0
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ pub type BoxedFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
|
||||||
pub type BoxedFuture<'a, T> = Pin<Box<dyn Future<Output = T> + 'a>>;
|
pub type BoxedFuture<'a, T> = Pin<Box<dyn Future<Output = T> + 'a>>;
|
||||||
|
|
||||||
/// A hasher builder that will create a fixed hasher.
|
/// A hasher builder that will create a fixed hasher.
|
||||||
#[derive(Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct FixedState;
|
pub struct FixedState;
|
||||||
|
|
||||||
impl std::hash::BuildHasher for FixedState {
|
impl std::hash::BuildHasher for FixedState {
|
||||||
|
|
Loading…
Reference in a new issue