this post was submitted on 13 Mar 2024
10 points (100.0% liked)
Rust
6117 readers
10 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The issue is related to the binding being reassigned then never used. It's happening because they're using code generation where the final loop doesn't need to assign. (but previous loops use the assignment at the loop start. Just throwing all that in a function and adding the warning suppression fixes it.
edit: I'm wrong, using an underscore works
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2ccac2a848523cb995b6c0efd92c569c