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
Using ent.clone() could not give the user a value different from *ent. This is not as bad as the first problem, but every time the user calls clone() instead of making a copy, he would spend time accessing thread-local hashmap inside the RefCell. May slow some things generic over Clone instead of Copy, like iter.cloned() instead of iter.map(|x| *x).
The text was updated successfully, but these errors were encountered:
This code either doesn't uphold a sane
Clone
invariant or is totally useless for anything but internal use.So, there are two possible problems:
ent.clone()
could give the user a value different from*ent
. This is kinda awful, becausesane_logic
function would panic:ent.clone()
could not give the user a value different from*ent
. This is not as bad as the first problem, but every time the user callsclone()
instead of making a copy, he would spend time accessing thread-local hashmap inside theRefCell
. May slow some things generic overClone
instead ofCopy
, likeiter.cloned()
instead ofiter.map(|x| *x)
.The text was updated successfully, but these errors were encountered: