chore: update to Rust 1.86.0 (#10282)
### Description
- trait_upcasting is now stable
- ~move some .as_bytes() calls before indexing~ reverted, breaks tests
- use repeat_n where applicable
- one .then() to if .. else
- formatting changes (again)
<!--
✍️ Write a short summary of your work.
If necessary, include relevant screenshots.
-->
### Testing Instructions
<!--
Give a quick description of steps to test your changes.
-->