tisonkun commented on code in PR #1:
URL: https://github.com/apache/datasketches-rust/pull/1#discussion_r2617229566
##########
src/hll/aux_map.rs:
##########
@@ -105,7 +105,9 @@ impl AuxMap {
let index = self.find(slot);
match index {
FindResult::Found(_) => {
- panic!("slot {} already exists in aux map", slot);
+ // Invariant: Array4 always check existance before inserting
+ // a new value on the same slot.
+ unreachable!("slot {} already exists in aux map", slot);
Review Comment:
That is, the assumption "Only Array4 would use AuxMap in a specific way" is
quite brittle in the current impl. But we can live with it anyway if we don't
change the related code ever.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]