this post was submitted on 08 Mar 2025
11 points (92.3% liked)
Rust Programming
8839 readers
21 users here now
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The second one is more expensive as you constantly are creating a new variable. In the first one you just constantly change the value of a variable.
That's what I thought.