diff --git a/src/methods-and-traits/methods.md b/src/methods-and-traits/methods.md index b78b42ed..83691fe4 100644 --- a/src/methods-and-traits/methods.md +++ b/src/methods-and-traits/methods.md @@ -31,7 +31,7 @@ impl Race { } fn finish(self) { // Exclusive ownership of self - let total = self.laps.iter().sum::(); + let total: i32 = self.laps.iter().sum(); println!("Race {} is finished, total lap time: {}", self.name, total); } }