this post was submitted on 08 Mar 2025
5 points (100.0% liked)
Rust Programming
8528 readers
31 users here now
founded 5 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.