Commit 2e729d8
committed
perf(buffer): unify Buffer::write_bytes with write_bytesview
`Buffer::write_bytes(value : Bytes)` and `Buffer::write_bytesview(value : BytesView)`
were doing the same thing with different parameter types. Expand the
former to `BytesView` and make it delegate — existing `Bytes` callers
keep working via coercion, and the implementation is now one line
instead of two parallel blit loops kept in sync.
`write_bytesview` stays for now (callers may have reached for the
explicit name); in a future cleanup it can be deprecated once downstream
migrates to just using `write_bytes`.
Continues the view-safe expansion theme (#3459, #3460, #3461).1 parent a098d73 commit 2e729d8
2 files changed
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
| 740 | + | |
| 741 | + | |
745 | 742 | | |
746 | 743 | | |
747 | 744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments