We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f2e505 commit 1ff4fb0Copy full SHA for 1ff4fb0
util/arbmath/bits.go
@@ -21,7 +21,11 @@ func FlipBit(data bytes32, bit byte) bytes32 {
21
22
// ConcatByteSlices unrolls a series of slices into a singular, concatenated slice
23
func ConcatByteSlices(slices ...[]byte) []byte {
24
- unrolled := []byte{}
+ totalLen := 0
25
+ for _, slice := range slices {
26
+ totalLen += len(slice)
27
+ }
28
+ unrolled := make([]byte, 0, totalLen)
29
for _, slice := range slices {
30
unrolled = append(unrolled, slice...)
31
}
0 commit comments