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
String::truncate specifies that it "panics if new_len > current length" Vec::truncate specifies that "If len is greater than the vector's current length, this has no effect.
This seems very inconsistent. I would personally prefer Vec's semantics. I'm not sure if it's a breaking change to add/remove a documented panic, and I fear it's not okay, but it feels very inconsistent.