Commit 3aed617
Potential fixes for 2 code quality findings (#35)
* Apply suggested fix to src/store/weight.rs from Copilot Autofix
* WeightStore invariant add to ensure total_weight is not less than entry.weight
* saturating_sub used to ensure no overflow
---------
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>1 parent 1fafd5b commit 3aed617
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
505 | 514 | | |
506 | 515 | | |
507 | 516 | | |
| |||
551 | 560 | | |
552 | 561 | | |
553 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
554 | 567 | | |
555 | 568 | | |
556 | 569 | | |
| |||
0 commit comments