It's true that async is not needed but I wanted to show how to use async/await in Rust.
A better example would be to pass multiple company names and fetch the data concurrently.
Great idea! I will be sure to implement that type of tutorial soon. Also, the ? operator is not the same as unwrap, you're right. Since this post is more for beginners and it wasn't focused on the ? operator, I just wanted them to be familiar with the syntax and not have to worry about what it does.
Thanks for your input.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's true that async is not needed but I wanted to show how to use async/await in Rust.
Great idea! I will be sure to implement that type of tutorial soon. Also, the
?
operator is not the same asunwrap
, you're right. Since this post is more for beginners and it wasn't focused on the?
operator, I just wanted them to be familiar with the syntax and not have to worry about what it does.Thanks for your input.