profile
viewpoint

Ask questionsWrong keyword mentioned in 'Method' description

book/src/ch05-03-method-syntax.md

Methods are similar to functions: they’re declared with the fn keyword and their name, they can have parameters and a return value, and they contain some code that is run when they’re called from somewhere else.

Isn't the keyword mentioned in the above statement supposed to be impl ?

rust-lang/book

Answer questions shameempk

It was my mistake. I stand corrected. But I still feel that impl should've mentioned in the first paragraph as it is a new keyword for those who follow the book.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List