Commit 0273ffe
Noam Preil
optimization: allocator: remove unnecessary branch
In branch 1, shift is defined as next-addr. We then slice buf with shift
as the offset, and with size+shift as length and capacity.
In branch 2, addr == next, and thus shift == 0. size+shift == size.
The slice statements are thus equivalent; there's no reason to be
branching here.1 parent 2d3593f commit 0273ffe
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 27 | + | |
| 28 | + | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
| |||
0 commit comments