This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch scala3
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-connectors.git

commit 9dfb468573229c1d3799180709a340cedceabf08
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Jun 12 18:58:27 2023 +0100

    suggested change to queue method call (#174)
---
 .../stream/connectors/json/impl/QueueHelper.scala   | 19 -------------------
 .../stream/connectors/json/impl/QueueHelper.scala   | 21 ---------------------
 .../connectors/json/impl/JsonStreamReader.scala     |  2 +-
 3 files changed, 1 insertion(+), 41 deletions(-)

diff --git 
a/json-streaming/src/main/scala-2/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
 
b/json-streaming/src/main/scala-2/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
deleted file mode 100644
index 5972a1eca..000000000
--- 
a/json-streaming/src/main/scala-2/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, derived from Akka.
- */
-
-package org.apache.pekko.stream.connectors.json.impl
-
-import org.apache.pekko.util.ByteString
-
-import scala.collection.immutable.Queue
-
-private[impl] object QueueHelper {
-  @inline final def enqueue(queue: Queue[ByteString], byteString: ByteString): 
Queue[ByteString] =
-    queue.enqueue(byteString)
-}
diff --git 
a/json-streaming/src/main/scala-3/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
 
b/json-streaming/src/main/scala-3/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
deleted file mode 100644
index 27b1f7f5e..000000000
--- 
a/json-streaming/src/main/scala-3/org/apache/pekko/stream/connectors/json/impl/QueueHelper.scala
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, derived from Akka.
- */
-
-package org.apache.pekko.stream.connectors.json.impl
-
-import org.apache.pekko.util.ByteString
-
-import scala.collection.immutable.Queue
-
-private[impl] object QueueHelper {
-  inline final def enqueue(queue: Queue[ByteString], byteString: ByteString): 
Queue[ByteString] = {
-    // see https://github.com/lampepfl/dotty/issues/17946
-    queue.enqueueAll(Iterable.single(byteString))
-  }
-}
diff --git 
a/json-streaming/src/main/scala/org/apache/pekko/stream/connectors/json/impl/JsonStreamReader.scala
 
b/json-streaming/src/main/scala/org/apache/pekko/stream/connectors/json/impl/JsonStreamReader.scala
index 990b68729..8f50d51d2 100644
--- 
a/json-streaming/src/main/scala/org/apache/pekko/stream/connectors/json/impl/JsonStreamReader.scala
+++ 
b/json-streaming/src/main/scala/org/apache/pekko/stream/connectors/json/impl/JsonStreamReader.scala
@@ -50,7 +50,7 @@ private[pekko] final class JsonStreamReader(path: JsonPath) 
extends GraphStage[F
           new JsonPathListener {
             override def onValue(value: Any, context: ParsingContext): Unit = {
               // see https://github.com/lampepfl/dotty/issues/17946
-              buffer = QueueHelper.enqueue(buffer, ByteString(value.toString))
+              buffer = buffer.enqueue[ByteString](ByteString(value.toString))
             }
           })
         .build


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to