Skip to content

Commit

Permalink
1 - instead of if/else
Browse files Browse the repository at this point in the history
  • Loading branch information
durban committed Apr 11, 2023
1 parent f578c63 commit b82c5e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/collections/HashMap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ object HashMap extends HashMapInstances with compat.HashMapCompatCompanion {
this
else if (contents.toVector.lengthCompare(2) == 0) {
// There will no longer be any collisions once the key is removed
val keepIndex = if (keyIndex == 0) 1 else 0
val keepIndex = 1 - keyIndex
// This is a singleton node so the depth doesn't matter;
// we only need to index into it to inline the value in our parent node
val mask = Node.maskFrom(collisionHash, depth = 0)
Expand Down

0 comments on commit b82c5e6

Please sign in to comment.