Closures - Rust

Veröffentlicht am: 18 Mai 2020
auf dem Kanal: danlogs
4,054
169

𝗜𝗠𝗣𝗢𝗥𝗧𝗔𝗡𝗧: 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  


Auf dieser Seite können Sie das Online-Video Closures - Rust mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer danlogs 18 Mai 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 4,054 Mal angesehen und es wurde von 169 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!