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
traitFoo{fnfrom_usize(x:usize) -> Self;}implFooforusize{fnfrom_usize(x:usize) -> Self{ x }}fnmain(){}
Gives:
warning: methods called `from_*` usually take no `self`
--> src/main.rs:5:19
|
5 | fn from_usize(x: usize) -> Self{ x }
| ^
|
= note: `#[warn(clippy::wrong_self_convention)]` on by default
= help: consider choosing a less ambiguous name
= help:for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
But this from_usize isn't taking self.
The text was updated successfully, but these errors were encountered:
Gives:
But this from_usize isn't taking
self
.The text was updated successfully, but these errors were encountered: