Open
Description
String
has some new methods not supported by inlinable_string::StringExt
trait, and some of them should be implemented using unsafe
to perform well (for example, insert_str
and retain
).
Of course they can be implemented without unsafe
(and they would be slow).
However, I think inlinable_string
crate should implement and test them in some way (possibly using unsafe
), before users try to implement by themselves.
Use of unsafe
should be gathered to upstream crates as possible, rather than written by every downstream user.
Here is a list of missing methods:
- as_mut_str (since 1.7.0)
- as_str (since 1.7.0)
- drain (since 1.6.0)
- insert_str (since 1.16.0)
- into_boxed_str (since 1.4.0)
- replace_range (since 1.6.0)
- retain (since 1.26.0)
- split_off (since 1.16.0)
They can be implemented to InlineString
without breaking changes.
However, adding them to StringExt
is breaking change, and it is better to be done at once.
Metadata
Metadata
Assignees
Labels
No labels