Skip to content

Chapter 3 - Section Supertraits - Does not fully illustrate supertraits #6

Description

@glafrance

In Chapter 3, Section Supertraits, the example code defines the Displayable trait as follows:

trait Displayable: Printable {
    fn display(&self);
}

But because both the Displayable and Printable traits are explicitly implemented for the Person struct, you don't need to extend the Displayable trait for Printable. Therefore in future editions of this book, please modify the section and the example code to actually illustrate super traits inaction, and providing the benefit of super traits.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions