Commit f15cd63
fix: resolve clippy warnings in cipher HAL
Address clippy warnings for safer and more idiomatic code:
**get_first warnings:**
- Replace `.get(0)` with `.first()` for accessing first array elements
- More expressive and idiomatic Rust code
**arithmetic_side_effects warnings:**
- Replace `+=` with `.saturating_add()` for safe increment
- Replace `*` with `.saturating_mul()` for safe multiplication
- Prevents potential overflow in arithmetic operations
**Security improvements:**
- Arithmetic operations now cannot overflow/panic
- Follows security guidelines for overflow-safe operations
- All tests continue to pass with improved safety
These changes align with the project's strict safety requirements while
maintaining full functionality and performance.1 parent ebd48c6 commit f15cd63
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
| 743 | + | |
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
| 811 | + | |
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| |||
0 commit comments