Skip to content

Commit

Permalink
Make README a bit clearer about how to use with Diesel 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quodlibetor committed May 12, 2022
1 parent 2f01b96 commit 33fc2b0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ Easy-peasy support of newtypes inside of Diesel.

[![Rust](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml/badge.svg)](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml) [![Crates.io Version](https://img.shields.io/crates/v/diesel-derive-newtype.svg)](https://crates.io/crates/diesel-derive-newtype)

## Installation

diesel-derive-newtype supports Diesel according to its major version -- 0.x
through 1.x support the corresponding diesel versions, 2.x supports diesel 2.x.

So for Diesel 1.x:

```toml
[dependencies]
diesel-derive-newtype = "1.0"
```

And for Diesel 2.x:

```toml
[dependencies]
diesel-derive-newtype = "2.0.0-rc.0"
```

## `#[derive(DieselNewType)]`

This crate exposes a single custom-derive macro `DieselNewType` which
Expand Down Expand Up @@ -113,16 +132,6 @@ I hope to find a solution that doesn't involve implementing every
keep in mind that the Diesel methods basically auto-transmute your data into
the underlying SQL type.

## Installation

diesel-derive-newtype supports Diesel according to its major version -- 0.x
through 1.x support the corresponding diesel versions, 2.x supports diesel 2.x.

```toml
[dependencies]
diesel-derive-newtype = "1.0"
```

## License

diesel-derive-newtype is licensed under either of
Expand Down
13 changes: 11 additions & 2 deletions README.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,27 @@ Easy-peasy support of newtypes inside of Diesel.

[![Rust](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml/badge.svg)](https://github.com/quodlibetor/diesel-derive-newtype/actions/workflows/test.yml) [![Crates.io Version](https://img.shields.io/crates/v/diesel-derive-newtype.svg)](https://crates.io/crates/diesel-derive-newtype)

{{readme}}

## Installation

diesel-derive-newtype supports Diesel according to its major version -- 0.x
through 1.x support the corresponding diesel versions, 2.x supports diesel 2.x.

So for Diesel 1.x:

```toml
[dependencies]
diesel-derive-newtype = "1.0"
```

And for Diesel 2.x:

```toml
[dependencies]
diesel-derive-newtype = "2.0.0-rc.0"
```

{{readme}}

## License

diesel-derive-newtype is licensed under either of
Expand Down

0 comments on commit 33fc2b0

Please sign in to comment.