Skip to content

Typo in 10.2. Traits: Defining Shared Behavior #4399

Open
@Cobran53

Description

@Cobran53

After listing 10-13, we have another blcok of code, that reads :


fn main() {
    let post = SocialPost {
        username: String::from("horse_ebooks"),
        content: String::from(
            "of course, as you probably already know, people",
        ),
        reply: false,
        repost: false,
    };

    println!("1 new social post: {}", post.summarize());
}

this is followed by a small explanation, reading :

This code prints 1 new post: horse_ebooks: of course, as you probably already know, people.

while this should read

This code prints 1 new _social_ post: horse_ebooks: of course, as you probably already know, people.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions