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
warning: methods called `into_*` usually take self by value; consider choosing a less ambiguous name
--> src/main.rs:4:19
|
4 | fn into_inner(this: Self) -> T {
| ^^^^
|
= note: #[warn(clippy::wrong_self_convention)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#wrong_self_convention
Receiving Self via a this: Self parameter to avoid method name collisions is an idiomatic pattern for implementing methods on a smart pointer-like type, as exemplified by std::rc::Rc::into_raw.
The text was updated successfully, but these errors were encountered:
The following code triggers
wrong_self_convention
:(Playground)
Receiving
Self
via athis: Self
parameter to avoid method name collisions is an idiomatic pattern for implementing methods on a smart pointer-like type, as exemplified bystd::rc::Rc::into_raw
.The text was updated successfully, but these errors were encountered: