typelevel/cats

Make `Hash.fromUniversalHashCode` null safe

开放

#4,831 创建于 2026年2月22日

 (6 条评论) (1 个反应) (1 位负责人)Scala (1,241 个派生)batch import
good first issue

仓库指标

星标
 (5,438 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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 ==.)

贡献者指南