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
ToString is specialized for string types to avoid using expensive formatting facility. This specialization can be missed by calling to_string on redundantly-referenced strings like &&str or &&String which may easily occur when working with iterators, for example:
// Generic implementation for `T: Display` is used (slow)["foo","bar"].iter().map(|s| s.to_string());// OK, the specialized impl is used["foo","bar"].iter().map(|&s| s.to_string());
The text was updated successfully, but these errors were encountered:
ToString
is specialized for string types to avoid using expensive formatting facility. This specialization can be missed by callingto_string
on redundantly-referenced strings like&&str
or&&String
which may easily occur when working with iterators, for example:The text was updated successfully, but these errors were encountered: