He-Pin commented on code in PR #2306:
URL: https://github.com/apache/pekko/pull/2306#discussion_r2441670941


##########
actor/src/main/scala/org/apache/pekko/util/ByteString.scala:
##########
@@ -1056,6 +1056,72 @@ sealed abstract class ByteString
    */
   def indexOf(elem: Byte): Int = indexOf(elem, 0)
 
+  override def indexOfSlice[B >: Byte](slice: scala.collection.Seq[B], from: 
Int): Int = {
+    // this is only called if the first byte matches, so we can skip that check
+    def check(startPos: Int): Boolean = {

Review Comment:
   Those two methods `check` can create closures; we can make it a private 
method.



-- 
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]

Reply via email to