Skip to content

Commit 8d81a6b

Browse files
committed
timeuuid: implement Hash for CqlTimeuuid
1 parent 71f9e7a commit 8d81a6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scylla-cql/src/frame/value.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ impl PartialEq for CqlTimeuuid {
154154
}
155155
}
156156

157+
impl std::hash::Hash for CqlTimeuuid {
158+
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
159+
self.lsb_signed().hash(state);
160+
self.msb().hash(state);
161+
}
162+
}
163+
157164
/// Native CQL date representation that allows for a bigger range of dates (-262145-1-1 to 262143-12-31).
158165
///
159166
/// Represented as number of days since -5877641-06-23 i.e. 2^31 days before unix epoch.

0 commit comments

Comments
 (0)