Browse Source

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

pull/1541/head
Michele Sessa 2 years ago committed by Michele
parent
commit
31833e4418
  1. 4
      subjects/tuples_refs/README.md

4
subjects/tuples_refs/README.md

@ -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…
Cancel
Save