Comment Comment by lordnaikon I wrote you a little example but i think you need to know rust to really understand it :(https://is.gd/FlBCJ0you cannot uncomment the comments in the main function and use it wrong, the compiler prevents you to compile this code.these two sections from the book may help understad thishttps://doc.rust-lang.org/book/ownership.htmlhttps://doc.rust-lang.org/book/references-and-borrowing.htmlif you're more into videos this may helphttp://intorust.com/tutorial/ownership/http://intorust.com/tutorial/shared-borrows/ parent lordnaikon 9 years ago
https://is.gd/FlBCJ0
you cannot uncomment the comments in the main function and use it wrong, the compiler prevents you to compile this code.
these two sections from the book may help understad this
https://doc.rust-lang.org/book/ownership.html
https://doc.rust-lang.org/book/references-and-borrowing.html
if you're more into videos this may help
http://intorust.com/tutorial/ownership/
http://intorust.com/tutorial/shared-borrows/