Skip to content

Commit ee0e507

Browse files
committed
format
1 parent dd78fc9 commit ee0e507

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

actor/src/main/scala/org/apache/pekko/util/ByteString.scala

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,9 @@ object ByteString {
617617

618618
// Derived from code in Netty
619619
// https://github.com/netty/netty/blob/d28a0fc6598b50fbe8f296831777cf4b653a475f/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L366-L408
620-
override private[util] def bytesMatch(fromIndex: Int, checkBytes: Array[Byte], bytesFromIndex: Int,
620+
override private[util] def bytesMatch(fromIndex: Int,
621+
checkBytes: Array[Byte],
622+
bytesFromIndex: Int,
621623
checkLength: Int): Boolean = {
622624
var aIndex = fromIndex + startIndex
623625
var bIndex = bytesFromIndex
@@ -977,8 +979,10 @@ object ByteString {
977979
}
978980
}
979981

980-
private[util] def bytesMatch(fromIndex: Int, checkBytes: Array[Byte], checkBytesFromIndex: Int, checkLength: Int)
981-
: Boolean = {
982+
private[util] def bytesMatch(fromIndex: Int,
983+
checkBytes: Array[Byte],
984+
checkBytesFromIndex: Int,
985+
checkLength: Int): Boolean = {
982986
if (checkLength > 1 && bytestrings.nonEmpty && bytestrings.head.length >= fromIndex + checkLength - 1) {
983987
bytestrings.head.bytesMatch(fromIndex, checkBytes, checkBytesFromIndex, checkLength)
984988
} else {
@@ -1230,8 +1234,10 @@ sealed abstract class ByteString
12301234
* Tests whether the bytes in a segment of this ByteString match the provided bytes.
12311235
* Internal use only. ByteString1 and ByteString1C have optimized versions.
12321236
*/
1233-
private[util] def bytesMatch(fromIndex: Int, checkBytes: Array[Byte], checkBytesFromIndex: Int, checkLength: Int)
1234-
: Boolean
1237+
private[util] def bytesMatch(fromIndex: Int,
1238+
checkBytes: Array[Byte],
1239+
checkBytesFromIndex: Int,
1240+
checkLength: Int): Boolean
12351241

12361242
override def grouped(size: Int): Iterator[ByteString] = {
12371243
if (size <= 0) {

0 commit comments

Comments
 (0)