Commit d3a5a6f
committed
add support for zero length HeaderVec
Having a HeaderVec being zero length is mostly useless because it has to reallocated instanly
when anything becomes pushed. This clearly should be avoided!
Nevertheless supporting zero length takes out a corner-case and a potential panic and removes
the burden for users explicitly ensuring zero length HeaderVecs don't happen in
practice. Generally improving software reliability.1 parent 2b4fbf6 commit d3a5a6f
2 files changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
274 | | - | |
275 | | - | |
276 | 273 | | |
277 | 274 | | |
278 | 275 | | |
| |||
281 | 278 | | |
282 | 279 | | |
283 | 280 | | |
284 | | - | |
| 281 | + | |
285 | 282 | | |
286 | 283 | | |
287 | 284 | | |
288 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
| |||
0 commit comments