There is this thing called static analysers, that while they are not perfect, are quite good guard rails into what to use in terms of best practices, regardless of the programming language.
Code quality would be much better in general if everyone actually used "clippy".
Which is anyway a moot point in the age of AI generated code.