Skip to content

Commit

Permalink
Fix "Display type" to "Display trait" in ch19-03
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon authored and carols10cents committed Apr 11, 2024
1 parent 93293f0 commit e58f1ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch19-03-advanced-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ that holds an instance of `Vec<T>`; then we can implement `Display` on

The implementation of `Display` uses `self.0` to access the inner `Vec<T>`,
because `Wrapper` is a tuple struct and `Vec<T>` is the item at index 0 in the
tuple. Then we can use the functionality of the `Display` type on `Wrapper`.
tuple. Then we can use the functionality of the `Display` trait on `Wrapper`.

The downside of using this technique is that `Wrapper` is a new type, so it
doesn’t have the methods of the value it’s holding. We would have to implement
Expand Down

0 comments on commit e58f1ca

Please sign in to comment.