While I understand the reason for clone_from been forced on users by clippy, I definitely feel that its something that should have been sugared away.
I think retaining more intuitive way of assigning variables will go a long way for someone who comes from different languages.
Or the whole ecosystems will grow with one more clippy warning to shush.
// this is intuitive
*b = a;
// this is not
b.clone_from(a)
This works if either a is not used anymore, or it is Copy; in both cases, clone is redundant. If you need clone, it will always be explicit, either as *b = a.clone(), or as b.clone_from(a).
Note also that the lint you're likely referring to is in the pedantic group - therefore, it's designed to be opt-in, when the project's maintainer feels it's necessary, not to be imposed on anyone. If you like a.clone() more, very well, just don't enable this lint.
// this is intuitive
*b = a;
// this is not
b.clone_from(a)
I am not sure about that statement. Other languages are full of operator overloading. While short and convenient I like to see what is done at the actual line of source code.
Assigning an egg to a dog still does not seem intuitive at all to me.
Also in Rust things (still) confuse me: you can write the traits From, Or, And, OrAssign, AndAssign.
From is not done the 'intuitive' way I think. The last ones are mapped to | & statements.
I really should study on these little details...