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.

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