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
to_owned is not marked #[inline] while String::from is. Check the assembly, one is inlined and the other isn't. It probably doesn't matter and in fact I can't measure any performance difference with short strings (and long ones are probably dominated by the memcpy anyway). Maybe we should just stop inlining from to make binaries a tiny bit smaller. Either way, it's unfortunate that these two conversion methods, which are often described as being exactly equivalent, aren't.