He-Pin commented on code in PR #75:
URL:
https://github.com/apache/incubator-pekko-connectors/pull/75#discussion_r1143778233
##########
s3/src/main/scala/org/apache/pekko/stream/connectors/s3/impl/SplitAfterSize.scala:
##########
@@ -38,43 +38,46 @@ import scala.annotation.tailrec
def apply[I, M](minChunkSize: Int,
maxChunkSize: Int)(in: Flow[I, ByteString, M]): SubFlow[ByteString, M,
in.Repr, in.Closed] = {
require(minChunkSize < maxChunkSize, "the min chunk size must be smaller
than the max chunk size")
- in.via(insertMarkers(minChunkSize, maxChunkSize)).splitWhen(_ ==
NewStream).collect { case bs: ByteString => bs }
+ in.via(insertMarkers(minChunkSize, maxChunkSize))
+ .splitWhen(_ == NewStream)
+ .collect { case bs: ByteString => bs }
}
private case object NewStream
- private def insertMarkers(minChunkSize: Long, maxChunkSize: Int) = new
GraphStage[FlowShape[ByteString, Any]] {
- val in = Inlet[ByteString]("SplitAfterSize.in")
- val out = Outlet[Any]("SplitAfterSize.out")
- override val shape = FlowShape.of(in, out)
+ private def insertMarkers(minChunkSize: Long, maxChunkSize: Int):
GraphStage[FlowShape[ByteString, Any]] =
Review Comment:
Adding an explicit type annotation, otherwise, it won't compile locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]