The Ultimate Guide to self, Self in Rust
The starting block for most Rust application are impl and traits. While writing out impl and traits, you'll see Self, self and their counterpart with the borrow sign &self, &Self. While Self is mostly used for denoting a Rust type, &self can either b...
hannydevelop.hashnode.dev6 min read
Brian Obot
Passionate Software Engineer and particular enthusiastic Python/Django developer
"This is because me has ownership for Ugochi while you tries to take ownership of Ugochi. To fix the error, we'll borrow Ugochi from me without taking ownership."
This is not correct, because the assignment of the value that was owned by me to you actually works, the issue in the piece of code is trying to access the now undefined me variable, because it value has been moved into the you variable,
Now assigning you to a reference of me works too, but the Quote from above would simply mislead beginners as to what the issue is