Skip to content

Instantly share code, notes, and snippets.

@MansurAshraf
Created April 10, 2014 01:58
Show Gist options
  • Save MansurAshraf/10336681 to your computer and use it in GitHub Desktop.
Save MansurAshraf/10336681 to your computer and use it in GitHub Desktop.
Injection bluess
override def multiPut[K1 <: String](kvs: Map[K1, Option[String]]): Map[K1, Future[Unit]] = {
implicit val inj=StringCodec.utf8
multiPutValues(kvs)
}
def multiPutValues[K:Codec, V:Codec](kvs: Map[K, Option[V]]): Map[K, Future[Unit]]={...}
Error:(84, 19) Cannot find Injection type class from K1 to Array[Byte]
multiPutValues(kvs)
^
@MansurAshraf
Copy link
Author

I have an Injection from String to Array[Byte] and K1 is covariant on String. I cant figure out how to get an injection from K1 to Array[Byte] so that I can call multiPutValues function???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment