apple / swift-cassandra-client

Cassandra client in Swift
https://swiftpackageindex.com/apple/swift-cassandra-client/main/documentation/cassandraclient
Apache License 2.0
94 stars 21 forks source link

Add Hashable to Configuration & Consistency enums #27

Closed rnro closed 1 year ago

rnro commented 1 year ago

There are a few simple public enums which I think it would be convenient if they were equatable, and if Equatable why not Hashable.

Motivation:

I think it would be useful if these simple enums e.g SpeculativeExecutionPolicy were Equatable to allow things like assertions to operate on them conveniently.

Modifications:

Add Hashable conformance to some simple enums.

Result:

More ergonomic comparison and use of enums.