Skip to content

Commit

Permalink
in kernelJVM
Browse files Browse the repository at this point in the history
  • Loading branch information
satorg committed Jul 21, 2022
1 parent 39d42aa commit 92ee266
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ package compat

private[kernel] class HashCompat {
// Adapted from scala.util.hashing.MurmurHash#productHash.
private[kernel] def product1HashWithPrefix(_1Hash: Int, prefix: String): Int = {
private[kernel] def product1HashWithPrefix(_1Hash: Int, @unused prefix: String): Int = {
import scala.util.hashing.MurmurHash3._
var h = productSeed
h = mix(h, _1Hash)
finalizeHash(h, 1)
}

// Adapted from scala.util.hashing.MurmurHash#productHash.
private[cats] def product2HashWithPrefix(_1Hash: Int, _2Hash: Int, prefix: String): Int = {
private[cats] def product2HashWithPrefix(_1Hash: Int, _2Hash: Int, @unused prefix: String): Int = {
import scala.util.hashing.MurmurHash3._
var h = productSeed
h = mix(h, _1Hash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@
package cats.kernel
package instances

import cats.kernel.compat.scalaVersionSpecific._
import cats.kernel.compat.unused

import scala.collection.mutable
import compat.scalaVersionSpecific._

@suppressUnusedImportWarningForScalaVersionSpecific
trait MapInstances extends MapInstances1 {
implicit def catsKernelStdHashForMap[K: Hash, V: Hash]: Hash[Map[K, V]] =
implicit def catsKernelStdHashForMap[K, V](implicit @unused K: Hash[K], V: Hash[V]): Hash[Map[K, V]] =
new MapHash[K, V]

implicit def catsKernelStdCommutativeMonoidForMap[K, V: CommutativeSemigroup]: CommutativeMonoid[Map[K, V]] =
Expand Down
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
val sbtTypelevelVersion = "0.4.13"
val sbtTypelevelVersion = "0.5-854ffb3-SNAPSHOT"
resolvers ++= Resolver.sonatypeOssRepos("snapshots")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion)
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % sbtTypelevelVersion)
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
Expand Down

0 comments on commit 92ee266

Please sign in to comment.