04 Ownership & Borrowing | Rust Tutorials
ฝัง
- เผยแพร่เมื่อ 2 มิ.ย. 2024
- Check out the entire playlist here: • Rust Tutorials
In this video, I will be covering the stack/heap memory model followed by Rust's Ownership system and borrowing system
Find me elsewhere:
Instagram: / jeff.no.zhao
Github: github.com/kamiyaa
By far the most well explained video on youtube about rust ownership and borrowing. Showing a visual representation of what's happening to the memory was the most important part and it helped me understand everything.
I’m a few months into learning the programming world, and this is a massive help and explaining these basic concepts to me.
Thanks bud, that was the clearest explanation ive seen so far of the borrowing checker !
Damn these are the best tutorials
Amazed by this video. Thanks
very nice explanation. keep it up
Great tut, thx
underrated
Awesome!
Sorry I have a question about your explanation here, in 5:13min precisely, I thought the macro `println` is a function that will own s1, and it has its own scope, if that is correct, then s1 will be deallocated first, then s2, while you refer to the end of the scope by the end of the bracket? is my understanding correct? or something I missed here? again, I am very much thankful for the effort of making such an amazing explanation video. This will not change the fact of what you have stated, but just for my understanding, thank you very much.
I found the answer here: The macros print!, println!, eprint!, eprintln!, write!, writeln! and format! are a special case and implicitly take a reference to any arguments to be formatted. These macros do not behave as normal functions and macros do for reasons of convenience; the fact that they take references silently is part of that difference.
Thank you.
Thanks
5:12 the code throws an error because S1 ownership passed down to S2 and the compiler will execute an error message.
thnx for the video
BIG NOOT!