Skip to content

Commit 9e3d31e

Browse files
committed
Minor readme fixes
* diesel-async 0.3.0 is now released and should be used in combination with diesel 2.1 * There was a typo in one of the structs * `AsyncConnection::establish` uses a `&str` as parameter
1 parent e528cfb commit 9e3d31e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ A normal project should use a setup similar to the following one:
2727

2828
```toml
2929
[dependencies]
30-
diesel = "2.0.3" # no backend features need to be enabled
31-
diesel-async = { version = "0.2.1", features = ["postgres"] }
30+
diesel = "2.1.0" # no backend features need to be enabled
31+
diesel-async = { version = "0.3.1", features = ["postgres"] }
3232
```
3333

3434
This allows to import the relevant traits from both crates:
@@ -50,11 +50,11 @@ table! {
5050
#[diesel(table_name = users)]
5151
struct User {
5252
id: i32,
53-
name: Text,
53+
name: String,
5454
}
5555

5656
// create an async connection
57-
let mut connection = AsyncPgConnection::establish(std::env::var("DATABASE_URL")?).await?;
57+
let mut connection = AsyncPgConnection::establish(&std::env::var("DATABASE_URL")?).await?;
5858

5959
// use ordinary diesel query dsl to construct your query
6060
let data: Vec<User> = users::table

0 commit comments

Comments
 (0)