From 826ae874b821f55452759c7eca45af84ca907b60 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Fri, 1 Apr 2022 02:54:25 +0000 Subject: [PATCH] Fix Scala 3 compile --- .../main/scala/org/http4s/crypto/HmacKeyGenPlatform.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/js/src/main/scala/org/http4s/crypto/HmacKeyGenPlatform.scala b/crypto/js/src/main/scala/org/http4s/crypto/HmacKeyGenPlatform.scala index e3fbbfe..508d91e 100644 --- a/crypto/js/src/main/scala/org/http4s/crypto/HmacKeyGenPlatform.scala +++ b/crypto/js/src/main/scala/org/http4s/crypto/HmacKeyGenPlatform.scala @@ -37,13 +37,13 @@ private[crypto] trait HmacKeyGenCompanionPlatform { Some(F) .collect { case f: Async[F] => f } .fold { - F.delay { + F.delay[SecretKey[A]] { val key = crypto.generateKeySync("hmac", GenerateKeyOptions(algorithm.minimumKeyLength)) SecretKeySpec(ByteVector.view(key.`export`()), algorithm) } } { F => - F.async_ { cb => + F.async_[SecretKey[A]] { cb => crypto.generateKey( "hmac", GenerateKeyOptions(algorithm.minimumKeyLength), @@ -55,7 +55,6 @@ private[crypto] trait HmacKeyGenCompanionPlatform { ) } } - .widen } else