From 3cd40e5cc3aae223c78ba95f959e7c5dd1f83806 Mon Sep 17 00:00:00 2001 From: davhojt Date: Mon, 13 Jun 2022 00:38:34 +0300 Subject: [PATCH] docs(lifetimes) correct grammar --- subjects/lifetimes/README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/subjects/lifetimes/README.md b/subjects/lifetimes/README.md index 1196bea1..161bda71 100644 --- a/subjects/lifetimes/README.md +++ b/subjects/lifetimes/README.md @@ -2,18 +2,7 @@ ### Instructions -Declare the struct called `Person` that has two fields: - -- name of type string slice (&str) -- age of type u8 - -Additionaly, create the associated **function** `new` which creates a new person with age 0 and with the name given. - -The expected Fucntions and Structures need to be completed. - -### Notions - -- [lifetimes](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html) +Complete the `Person` struct with the fields and associated function described below. `new` should set the `age` to `0`. ### Expected Functions and Data Structures (Both need to be completed) @@ -51,3 +40,7 @@ $ cargo run Person = Person { name: "Leo", age: 0 } $ ``` + +### Notions + +- [lifetimes](https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html)