Skip to content

Commit 5b64af7

Browse files
committed
motivate derive a bit more
1 parent 84ccc74 commit 5b64af7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

_posts/2017-02-02-Rust-1.15.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ struct Pet {
3333
}
3434
```
3535

36-
The `Debug` trait is then implemented for `Pet`. However, this only worked for
37-
traits provided as part of the standard library; it was not customizable. With
38-
Rust 1.15, it now is. That means, if you want to turn your `Pet` into JSON, it's
39-
as easy as adding [Serde][serde] to your `Cargo.toml`:
36+
The `Debug` trait is then implemented for `Pet`, with vastly less boilerplate.
37+
However, this only worked for traits provided as part of the standard library;
38+
it was not customizable. With Rust 1.15, it now is. That means, if you want to
39+
turn your `Pet` into JSON, it's as easy as adding [Serde][serde] to your
40+
`Cargo.toml`:
4041

4142
```toml
4243
[dependencies]

0 commit comments

Comments
 (0)