mirror of https://github.com/01-edu/public.git
refactor(tuples_refs): change id type for more idiomatic rust
This commit is contained in:
parent
000ba6542c
commit
31833e4418
|
@ -2,12 +2,12 @@
|
|||
|
||||
### 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.
|
||||
|
||||
```rust
|
||||
pub fn id(student: &Student) -> i32 {
|
||||
pub fn id(student: &Student) -> u32 {
|
||||
}
|
||||
|
||||
pub fn first_name(student: &Student) -> String {
|
||||
|
|
Loading…
Reference in New Issue