You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2023/06/12 17:58:33 UTC
[incubator-pekko-connectors] branch scala3 updated: suggested change to queue method call (#174)
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
The following commit(s) were added to refs/heads/scala3 by this push:
new 93924861a suggested change to queue method call (#174)
93924861a is described below
commit 93924861a9d0b981f3fd96439ed216b5ffb4f638
Author: PJ Fanning <pj...@users.noreply.github.com>
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 bd3fee912..2edba7bfc 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: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org