typelevel/cats

Make `Hash.fromUniversalHashCode` null safe

Open

#4831 aperta il 22 feb 2026

Vedi su GitHub
 (6 commenti) (1 reazione) (1 assegnatario)Scala (1241 fork)batch import
good first issue

Metriche repository

Star
 (5438 star)
Metriche merge PR
 (Merge medio 4h 2m) (5 PR mergiate in 30 g)

Descrizione

Similarly to how Show.fromToString have been recently made null safe (#4689 and #4790), I propose making Hash.fromUniversalHashCode also null safe. Specifically, I think it should use x.## instead of x.hashCode(). (The eqv method is already fine, as it uses ==.)

Guida contributor