You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The health-statistics exercise isn't really about borrowing. Let's find something better, such as something that re-borrows fields in a struct. Maybe tree traversal?
The text was updated successfully, but these errors were encountered:
Would have been helpful to have comments on struct fields
u32 to i32 conversions are bad (note that the solution doesn't follow my suggestion to avoid as). Could use u16 to allow .into() conversion to i32, and still cover all conceivable blood pressures.
To be fair, this exercise used to contain a teachable moment about the way the borrow checker reasons around using the .name() accessor versus borrowing the .name field inline, but at some point that method was removed. I do agree that in its current state this exercise isn't a good fit for curriculum on borrowing, and students have noted this in my classes.
The health-statistics exercise isn't really about borrowing. Let's find something better, such as something that re-borrows fields in a struct. Maybe tree traversal?
The text was updated successfully, but these errors were encountered: