News for hackers. Stuff that matters.
Re:My favorite Rust function by tridentlead on Saturday October 12, 2019 @07:44PM (#21237156)
Normally yes, if using an object. In this case, the integer types implement the Copy trait, so instead of actually having your first call to add1 take ownership of x, it will just operate on a copy of the value, so your second call will work too.

There are no comments on this comment yet.