Skip to content

Commit 2cac7de

Browse files
authored
Merge pull request #3630 from typelevel/update/scala3-library-3.3.7
Update scala3-library, ... to 3.3.7
2 parents 875fa08 + 5f726c5 commit 2cac7de

File tree

12 files changed

+30
-30
lines changed

12 files changed

+30
-30
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ThisBuild / startYear := Some(2013)
1111
val Scala213 = "2.13.16"
1212

1313
ThisBuild / scalaVersion := Scala213
14-
ThisBuild / crossScalaVersions := Seq("2.12.20", Scala213, "3.3.6")
14+
ThisBuild / crossScalaVersions := Seq("2.12.20", Scala213, "3.3.7")
1515
ThisBuild / tlVersionIntroduced := Map("3" -> "3.0.3")
1616

1717
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest")

core/shared/src/main/scala-3/fs2/ChunkPlatform.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ package fs2
2424
import scodec.bits.ByteVector
2525

2626
import scala.collection.immutable.ArraySeq
27-
import scala.collection.immutable
2827
import scala.reflect.ClassTag
2928

3029
private[fs2] trait ChunkPlatform[+O] extends Chunk213And3Compat[O] {

core/shared/src/main/scala/fs2/Stream.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,7 @@ object Stream extends StreamLowPriority {
38163816
* are dequeued and emitted as a single chunk.
38173817
*/
38183818
@nowarn("msg=never used")
3819+
@nowarn3("msg=unused implicit parameter")
38193820
def fromQueueNoneTerminated[F[_]: Functor, A](
38203821
queue: QueueSource[F, Option[A]],
38213822
limit: Int = Int.MaxValue

integration/src/test/scala/fs2/MemoryLeakSpec.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,11 @@ class MemoryLeakSpec extends FunSuite {
218218

219219
leakTest("constant eval") {
220220
var cnt = 0
221-
var start = System.currentTimeMillis
222221
Stream
223222
.constant(())
224223
.flatMap { _ =>
225224
Stream.eval(IO {
226225
cnt = (cnt + 1) % 1000000
227-
if (cnt == 0) {
228-
val now = System.currentTimeMillis
229-
start = now
230-
}
231226
})
232227
}
233228
}

io/js/src/main/scala/fs2/io/internal/facade/net.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private[io] object net {
8282
@js.native
8383
class Socket extends fs2.io.Duplex {
8484

85-
def this(options: SocketOptions) = this()
85+
def this(@unused options: SocketOptions) = this()
8686

8787
def connect(path: String, connectListener: js.Function0[Unit]): Socket = js.native
8888

io/js/src/main/scala/fs2/io/internal/facade/tls.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private[io] object tls {
183183
@js.native
184184
class TLSSocket extends Socket {
185185

186-
def this(socket: fs2.io.Duplex, options: TLSSocketOptions) = this()
186+
def this(@unused socket: fs2.io.Duplex, @unused options: TLSSocketOptions) = this()
187187

188188
def alpnProtocol: String | Boolean = js.native
189189

io/js/src/main/scala/fs2/io/ioplatform.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ import fs2.io.internal.facade
3232

3333
import java.nio.charset.Charset
3434
import java.nio.charset.StandardCharsets
35-
import scala.annotation.nowarn
3635
import scala.scalajs.js
3736
import scala.scalajs.js.typedarray.Uint8Array
3837

38+
import org.typelevel.scalaccompat.annotation._
39+
3940
private[fs2] trait ioplatform {
4041

4142
@deprecated("Use suspendReadableAndRead instead", "3.1.4")
@@ -423,8 +424,7 @@ private[fs2] trait ioplatform {
423424
/** Stream of bytes read asynchronously from standard input.
424425
* Takes a dummy `Int` parameter for source-compatibility with JVM.
425426
*/
426-
@nowarn("msg=never used")
427-
def stdin[F[_]: Async](ignored: Int): Stream[F, Byte] = stdin
427+
def stdin[F[_]: Async](@unused ignored: Int): Stream[F, Byte] = stdin
428428

429429
/** Pipe of bytes that writes emitted values to standard output asynchronously. */
430430
def stdout[F[_]: Async]: Pipe[F, Byte, Nothing] = stdoutAsync
@@ -451,8 +451,7 @@ private[fs2] trait ioplatform {
451451
/** Stream of `String` read asynchronously from standard input decoded in UTF-8.
452452
* Takes a dummy `Int` parameter for source-compatibility with JVM.
453453
*/
454-
@nowarn("msg=never used")
455-
def stdinUtf8[F[_]: Async](ignored: Int): Stream[F, String] =
454+
def stdinUtf8[F[_]: Async](@unused ignored: Int): Stream[F, String] =
456455
stdinAsync.through(text.utf8.decode)
457456

458457
// Copied JVM implementations, for bincompat

io/jvm/src/main/scala/fs2/io/net/AsynchronousDatagramSocketGroup.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ private[net] object AsynchronousDatagramSocketGroup {
178178

179179
onSelectorThread {
180180
val channel = key.channel.asInstanceOf[DatagramChannel]
181-
var cancelReader: () => Unit = null
182181
if (attachment.hasReaders) {
183-
cancelReader = attachment.queueReader(readerId, cb)
182+
attachment.queueReader(readerId, cb)
183+
()
184184
} else if (!read1(channel, cb)) {
185-
cancelReader = attachment.queueReader(readerId, cb)
185+
attachment.queueReader(readerId, cb)
186186
try {
187187
key.interestOps(key.interestOps | SelectionKey.OP_READ); ()
188188
} catch {
@@ -239,11 +239,10 @@ private[net] object AsynchronousDatagramSocketGroup {
239239
val attachment = key.attachment.asInstanceOf[Attachment]
240240
onSelectorThread {
241241
val channel = key.channel.asInstanceOf[DatagramChannel]
242-
var cancelWriter: () => Unit = null
243242
if (attachment.hasWriters) {
244-
cancelWriter = attachment.queueWriter(writerId, (writerDatagram, cb))
243+
attachment.queueWriter(writerId, (writerDatagram, cb))
244+
()
245245
} else if (!write1(channel, writerDatagram, cb)) {
246-
cancelWriter = attachment.queueWriter(writerId, (writerDatagram, cb))
247246
try {
248247
key.interestOps(key.interestOps | SelectionKey.OP_WRITE); ()
249248
} catch {

protocols/shared/src/main/scala/fs2/protocols/ip/Ipv4Header.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
package fs2.protocols
2525
package ip
2626

27-
import scodec.bits._
27+
import scodec.bits.*
2828
import scodec.{Codec, SizeBound}
29-
import scodec.codecs._
30-
import scodec.compat._
31-
import fs2.interop.scodec._
29+
import scodec.codecs.*
30+
import fs2.interop.scodec.*
3231
import fs2.protocols.ethernet.{EtherType, EthernetFrameHeader}
3332
import com.comcast.ip4s.Ipv4Address
33+
import org.typelevel.scalaccompat.annotation.*
3434

3535
/** IPv4 header. */
3636
case class Ipv4Header(
@@ -43,7 +43,9 @@ case class Ipv4Header(
4343
options: BitVector
4444
) extends UnsealedIpHeader
4545

46+
@nowarn3("msg=unused import")
4647
object Ipv4Header {
48+
import scodec.compat.*
4749

4850
implicit val codec: Codec[Ipv4Header] = {
4951
// format: off

protocols/shared/src/main/scala/fs2/protocols/mpeg/PesPacketHeader.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323

2424
package fs2.protocols.mpeg
2525

26-
import scodec.bits._
26+
import scodec.bits.*
2727
import scodec.Codec
28-
import scodec.codecs._
29-
import scodec.compat._
28+
import scodec.codecs.*
29+
import org.typelevel.scalaccompat.annotation.*
3030

3131
sealed abstract class PesScramblingControl
3232
object PesScramblingControl {
@@ -61,7 +61,9 @@ case class PesPacketHeader(
6161
extension: Option[PesPacketHeader.Extension]
6262
)
6363

64+
@nowarn3("msg=unused import")
6465
object PesPacketHeader {
66+
import scodec.compat.*
6567

6668
case class Flags(
6769
ptsFlag: Boolean,

0 commit comments

Comments
 (0)