Commit db99f98
committed
Put panic code path from
The previous `assert_eq` generated quite some code, which is especially
problematic when this call is inlined. This commit also slightly
improves the panic message from:
assertion failed: `(left == right)`
left: `3`,
right: `2`: destination and source slices have different lengths
...to:
source slice length (2) does not match destination slice length (3)copy_from_slice into cold function1 parent 3df25ae commit db99f98
2 files changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
1525 | | - | |
| 1525 | + | |
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | 1531 | | |
1532 | 1532 | | |
1533 | | - | |
| 1533 | + | |
1534 | 1534 | | |
1535 | 1535 | | |
1536 | 1536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2501 | 2501 | | |
2502 | 2502 | | |
2503 | 2503 | | |
2504 | | - | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
2505 | 2520 | | |
2506 | 2521 | | |
2507 | 2522 | | |
| |||
0 commit comments