Update README.md (#2770)

* Update README.md

Quick helper on the async_std quickstart

* Move comment regard. `attributes` into code example

* doc(README): adjust wording of a comment

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This commit is contained in:
snspinn 2023-10-06 22:02:34 +01:00 committed by GitHub
parent 846dcfe52a
commit 7e9592c267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -234,7 +234,7 @@ use sqlx::postgres::PgPoolOptions;
// use sqlx::mysql::MySqlPoolOptions;
// etc.
#[async_std::main]
#[async_std::main] // Requires the `attributes` feature of `async-std`
// or #[tokio::main]
// or #[actix_web::main]
async fn main() -> Result<(), sqlx::Error> {
@ -257,6 +257,7 @@ async fn main() -> Result<(), sqlx::Error> {
}
```
### Connecting
A single connection can be established using any of the database connection types and calling `connect()`.