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
I have often found myself creating an internal error by calling foo.to_string() here. That causes an allocation at the call site, passes a reference from which a new allocation is made, and then throws away the original. It might be nice to take something like impl ToString and call to_string() internally.
The text was updated successfully, but these errors were encountered:
This was raised by @ahl in the following context:
Maybe these should accept
impl ToString
? orAsRef<str>
Originally posted by @ahl in #4874 (comment)
I have often found myself creating an internal error by calling
foo.to_string()
here. That causes an allocation at the call site, passes a reference from which a new allocation is made, and then throws away the original. It might be nice to take something likeimpl ToString
and callto_string()
internally.The text was updated successfully, but these errors were encountered: