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
As an optimization for the case when the slice length is not less than the padded size, the original slice could be returned in a Cow::Borrowed.
Changing the return type would be a breaking change, so if you have an established base of developers depending on your crate with leftpad = "*" and you don't want to upset them, a couple of functions could be added alongside:
left_pad_to_cow
left_pad_char_to_cow
The text was updated successfully, but these errors were encountered:
As an optimization for the case when the slice length is not less than the padded size, the original slice could be returned in a
Cow::Borrowed
.Changing the return type would be a breaking change, so if you have an established base of developers depending on your crate with
leftpad = "*"
and you don't want to upset them, a couple of functions could be added alongside:left_pad_to_cow
left_pad_char_to_cow
The text was updated successfully, but these errors were encountered: