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
clippy has a point; and it helps to distinguish between constructors that can't fail, and initialization actions that affect the world and can actually take action. The lint is clippy::new_ret_no_self.
The text was updated successfully, but these errors were encountered:
Actually, it looks like the lint was deliberately relaxed a bit, see here: rust-lang/rust-clippy#3313 and here: rust-lang/rust-clippy#3620. I think that, so long as Self is somewhere in the return type clippy does not issue a warning.
mulkieran
changed the title
Change functions named "new" to functions named "initialize" wherever clippy complains
Remove unnecessary clippy allows for new_ret_no_self
Jan 16, 2020
clippy has a point; and it helps to distinguish between constructors that can't fail, and initialization actions that affect the world and can actually take action. The lint is
clippy::new_ret_no_self
.The text was updated successfully, but these errors were encountered: