𝗜𝗠𝗣𝗢𝗥𝗧𝗔𝗡𝗧: At 8:17, I finish the example for 𝙵𝚗 but... I missed an ampersand 🤦♂️ ~ consequently, that example does not demonstrate an immutable borrow because x implements the Copy trait. A better example would be:
𝚕𝚎𝚝 𝚡𝟷 = 𝟷;
𝚕𝚎𝚝 𝚘𝚔𝟷 = | | &𝚡𝟷 + 𝟷;
𝚙𝚛𝚒𝚗𝚝𝚕𝚗!("{:?}" , 𝚘𝚔𝟷( ));
𝚙𝚛𝚒𝚗𝚝𝚕𝚗!("{:?}" , 𝚡𝟷);
Thanks @Nicholas Sterling for catching this mistake 🔥
Chapter 13.1
- The Rust Programming Language Book: https://doc.rust-lang.org/book/
- danlogs git repository: https://github.com/danbugs/danlogs/
- danlogs discord server: / discord
- Follow me on Twitter: / danologue
- Follow me on GitHub: https://github.com/danbugs/
- For business inquiries, contact me on LinkedIn: / danbiz
In questa pagina del sito puoi guardare il video online Closures - Rust della durata di ore minuti seconda in buona qualità , che l'utente ha caricato danlogs 18 maggio 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 4,054 volte e gli è piaciuto 169 spettatori. Buona visione!