Re:My favorite Rust function
by Twisol on Saturday October 12, 2019 @10:50PM
(#21238006)
In Rust, you can tell whether something is borrowed from the call site, without having to look at the function being called. If a function takes a reference (`&T`), then the caller must pass a reference. There's no implicit by-referencing as in C++'s `&` types.
(I realize you, saagarjha, probably know this already -- this is more a note to other readers.)
(I realize you, saagarjha, probably know this already -- this is more a note to other readers.)