JD557 commented on code in PR #1282: URL: https://github.com/apache/pekko/pull/1282#discussion_r1566223381
########## actor/src/main/scala-2.12/org/apache/pekko/util/ByteIterator.scala: ########## @@ -484,10 +484,10 @@ abstract class ByteIterator extends BufferedIterator[Byte] { } def indexOf(elem: Byte): Int = indexOf(elem, 0) - def indexOf(elem: Byte, from: Int): Int = indexWhere(_ == elem, from) + def indexOf(elem: Byte, from: Int): Int = indexWhere(elem == _, from) Review Comment: Good question. I was going to point to the stdlib, but apparently that's also inconsistent: - Iterator uses `_ == elem`: https://github.com/scala/scala/blob/v2.13.10/src/library/scala/collection/Iterator.scala#L449-L461 - `Seq` uses `elem == _`: https://github.com/scala/scala/blob/v2.13.10/src/library/scala/collection/Seq.scala#L365 Although I believe that `elem == _` makes more sense. ~~Otherwise it feels a bit useless to define `indexOf[B >: A]` 🤷~~ (Nevermind, it actually makes sense) -- 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: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org