refactor(tuples_refs): change id type for more idiomatic rust

This commit is contained in:
Michele Sessa 2022-10-12 15:32:53 +01:00 committed by Michele
parent 000ba6542c
commit 31833e4418
1 changed files with 2 additions and 2 deletions

View File

@ -2,12 +2,12 @@
### Instructions ### Instructions
- Define a tuple `struct` to represent a `Student`. Each is identified by an id of type `i32`, their first name and last name. - Define a tuple `struct` to represent a `Student`. Each is identified by an id of type `u32`, their first name and last name.
- Then define three **functions** to return the id, first name and last name. - Then define three **functions** to return the id, first name and last name.
```rust ```rust
pub fn id(student: &Student) -> i32 { pub fn id(student: &Student) -> u32 {
} }
pub fn first_name(student: &Student) -> String { pub fn first_name(student: &Student) -> String {