3 ms·
"Don’t use clone to avoid dealing with the borrow checker...There are few instances where it’s actually fine to use." there is a lot of places where .clone() i
by EugeneOZ 10y ago
"Don’t use clone to avoid dealing with the borrow checker...There are few instances where it’s actually fine to use."
there is a lot of places where .clone() is the only way, especially for strings. Sometimes you can use reference, but sometimes you need value and there is nothing wrong with it.