Skip to content

Commit

Permalink
Merge pull request #25 from qdrant/hashring-clone
Browse files Browse the repository at this point in the history
Derive Clone on HashRing type
  • Loading branch information
jeromefroe authored May 18, 2024
2 parents bdecca0 + 41146f4 commit 4010b6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ use std::fmt::Debug;
use std::hash::BuildHasher;
use std::hash::Hash;

#[derive(Clone)]
pub struct DefaultHashBuilder;

impl BuildHasher for DefaultHashBuilder {
Expand Down Expand Up @@ -133,6 +134,7 @@ impl<T> Ord for Node<T> {
}
}

#[derive(Clone)]
pub struct HashRing<T, S = DefaultHashBuilder> {
hash_builder: S,
ring: Vec<Node<T>>,
Expand Down

0 comments on commit 4010b6e

Please sign in to comment.