Added explicit apply method with return type Byte to class ByteString
This is necessary to prevent boxing/unboxing of Bytes on apply.
This commit is contained in:
parent
8d4986dde3
commit
3b67a4fdef
1 changed files with 2 additions and 0 deletions
|
|
@ -248,6 +248,8 @@ object ByteString {
|
|||
* TODO: Add performance characteristics
|
||||
*/
|
||||
sealed abstract class ByteString extends IndexedSeq[Byte] with IndexedSeqOptimized[Byte, ByteString] {
|
||||
def apply(idx: Int): Byte
|
||||
|
||||
override protected[this] def newBuilder: ByteStringBuilder = ByteString.newBuilder
|
||||
|
||||
// *must* be overridden by derived classes. This construction is necessary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue