Intro to Rust Control Flow Statements & Conditional Expressions 🦀

Published 2023-08-18
In this video, we'll take a look at some of the essential control flow statements in Rust, along with conditional expressions. We'll also learn how to prompt for user input in the terminal, using the read_line() function in the Rust standard library!

We'll specifically be looking at the if, else if, and else statements for starters. Then we'll move onto the while statement, and the loop statement.

🤯 Rust Programming Playlist 🦀    • Rust Programming Tutorial 🦀  

📖 Rust Control Flow: doc.rust-lang.org/book/ch03-05-control-flow.html
📖 Rust Reference - Loops: doc.rust-lang.org/reference/expressions/loop-expr.…
📖 Rust By Example - Loop: doc.rust-lang.org/rust-by-example/flow_control/loo…

Visual Studio Code ➡️ code.visualstudio.com/
Rust Website ➡️ rust-lang.org/
Rustup Installer ➡️ rustup.rs/
Rust Docs ➡️ doc.rust-lang.org/book

Please follow me on these other social channels!

➡️ trevorsullivan.net/
➡️ github.com/pcgeek86
➡️ twitter.com/pcgeek86
➡️ youtube.com/trevorsullivan
➡️ facebook.com/trevorsoftware
➡️ tiktok.com/pcgeek86

All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.

#opensource #software #linux #devops #programming #rusty #rustdev #dev #coding #codinglife #code #coder #ubuntu #ubuntulinux #appdev #rustlang #rust #developer

All Comments (20)
  • @parwisingh1171
    Went through lot of tutorials, you are the best guide .
  • @mytechnotalent
    Simply the best Rust tutorial that I have seen. I would LOVE to see a future Embassy PicoW embedded series from scratch working with TLS and BLE with security rather than just unsecured. Something like that would be ground breaking. Thank you for your work Trevor!
  • @aar021
    Thank you 🙏 this series is really great. Love your non nonsense approach.
  • @EzOddz
    Been learning rust as of recently I've went through multiple rust sources and I really like your content. I hope to learn more so I can reach a production level with this language thank you..
  • @MH-bw9lh
    Trying to learn Rust from the ground up and the content you provided is good for a beginner~~
  • @moose304
    I'm working through the playlist and it's been fantastic so far. Perhaps you cover this later but do you end up diving more into all the versions of "strings"? String pointers, slices, reference, mutable reference, different ways to create strings, etc. Or as a concrete example, what is happening on this line `let myinput: &mut String = &mut String::from("");` Looking at it, I sorta get it, but I definitely couldn't explain it, or create it on my own. Looking forward to the rest of the series! 👍
  • @princemarkied8071
    GASP!! Rust? if you learn it I follow Trevor !! What can it do? is it useful as C# ?
  • @prajganesh
    Great series. Can you clarify how to find module vs function? Like when do we do :: and how do we know it's a method. For example myinput.parse::().unwrap();
  • @Snapper-gaming
    Not sure if its because I am coding on windows, but replace \n with "" does not seem like good practice. Instead use the trim() method. The line will then look like this: let age: u8 = entered_age.trim().parse::().unwrap();
  • @AlfredSLotsu
    Show us backend with Rust, like rest and graphql
  • let age_to_drive: u8 = 16u8; let age_to_drive: u8 = 16; both are same or they have some difference?
  • @jesusmtz29
    Awesome but, how did you access the crab emoji so quickly lol
  • @soheil424
    By coming this far, I realized that Rust is the world's most bullshit programming language ever!
  • @amblessedcoding
    Hello you are going more advance I do not understand some code Explain some concept better