100-exercises-to-learn-rust icon indicating copy to clipboard operation
100-exercises-to-learn-rust copied to clipboard

4.9: Flesh out the explanation of `Output`

Open thomasaarholt opened this issue 1 year ago • 0 comments

I think 4.9 could benefit from an additional paragraph expanding on what type Output; does. In the solution for "4.13. Outro", there is the line type Output = SaturatingU16;, which I think could be type Output = Self;, since it is implemented for SaturatingU16?

I guess my main point of confusion is, "Why do we need to create the Output type, when we can just specify the return type in the function signature below?" and "Why can't we just specify -> Self in the function signature, why do we need -> Self::Output?

thomasaarholt avatar May 20 '24 06:05 thomasaarholt