Skip to content

Commit

Permalink
Minor fix for struct2.rs & struct4.rs examples
Browse files Browse the repository at this point in the history
  • Loading branch information
russellmcnally committed Jun 8, 2020
1 parent 11650e1 commit f7f2705
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/2-structs-enums-lifetimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ struct Person {

impl Person {

fn new(first: &str, name: &str) -> Person {
fn new(first: &str, last: &str) -> Person {
Person {
first_name: first.to_string(),
last_name: name.to_string()
last_name: last.to_string()
}
}

Expand Down Expand Up @@ -400,10 +400,10 @@ struct Person {

impl Person {

fn new(first: &str, name: &str) -> Person {
fn new(first: &str, last: &str) -> Person {
Person {
first_name: first.to_string(),
last_name: name.to_string()
last_name: last.to_string()
}
}

Expand Down

0 comments on commit f7f2705

Please sign in to comment.