Commit ce1bfa3
committed
Avoid unnecessary .expect()s for empty HeaderMap
This change removes the Result::expect() calls in the constructors for
an empty HeaderMap. These calls were provably not going to fail at
runtime but rustc's inliner wasn't smart enough to figure that out:
strings analysis of compiled binaries showed that the error message to
the expect() still showed up in generated code.
There are no behavioral differences as a result of this change.1 parent 4304e60 commit ce1bfa3
1 file changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
448 | 449 | | |
449 | | - | |
| 450 | + | |
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
454 | 465 | | |
455 | 466 | | |
456 | 467 | | |
| |||
501 | 512 | | |
502 | 513 | | |
503 | 514 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 515 | + | |
511 | 516 | | |
512 | 517 | | |
513 | 518 | | |
| |||
2165 | 2170 | | |
2166 | 2171 | | |
2167 | 2172 | | |
| 2173 | + | |
2168 | 2174 | | |
2169 | | - | |
| 2175 | + | |
2170 | 2176 | | |
2171 | 2177 | | |
2172 | 2178 | | |
| |||
0 commit comments