Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jhwgh1968 committed Aug 19, 2023
1 parent 624f52f commit d630d51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/functional/optics.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ fn main() {

That seems quite logical. However, there are two problems with this.

First, `to_string` is to a very good way to explain "this is JSON." Every type
First, `to_string` does not indicate to API users, "this is JSON." Every type
would need to agree on a JSON representation, and many of the types in the Rust
standard library already don't. Using this is a poor fit. This can easily be
resolved with our own trait.
Expand Down Expand Up @@ -350,9 +350,9 @@ Thus we have the Serde API:
1. Each type to be serialized implements `Deserialize` or `Serialize`,
equivalent to the `Serde` class
1. They get a type (well two, one for each direction) implementing the `Visitor`
trait, which are usually (but not always) through macro-generated code. This
contains the logic to construct or destruct between the data type and the
format of the Serde data model.
trait, which are usually (but not always) is done through code generated by
a derive macro. This contains the logic to construct or destruct between the
data type and the format of the Serde data model.
1. The type implementing the `Deserializer` trait handles all details specific
to the format, being "driven by" the `Visitor`.

Expand Down

0 comments on commit d630d51

Please sign in to comment.