-
Notifications
You must be signed in to change notification settings - Fork 341
polish lib.rs examples #523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6c74517
to
2dfdc1c
Compare
Signed-off-by: Yoshua Wuyts <[email protected]>
I don't know if this is sufficient to close the issue. const main = async function () {
const rows = await queryDatabase()
const apiResponse = await fetchJson()
} I think an example that showcases multiple uses of |
d7fa0cc
to
1431ee0
Compare
Signed-off-by: Yoshua Wuyts <[email protected]>
Signed-off-by: Yoshua Wuyts <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm after @k-nasa's comment on the attributes
feature gets addressed.
Signed-off-by: Yoshua Wuyts <[email protected]>
Here is an example that shows passing 3 arguments within a task::block_on, 2 string arguments along with a vector of strings.
|
This updates our lib.rs examples, showing off more of what async-std can do, and somewhat simplifying what we were already doing. Additionally it should make it nicer for people from other languages to understand what async rust is about.
Closes #522. Thanks!
Screenshots