Remove the return value of String::splice #44038
Labels
A-collections
Area: `std::collection`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
As discussed in #32310, it is never necessary to look at the return value of String::splice. Applying the splice eagerly is always simpler and at least as efficient.
With a return value:
splice
, receiveSplice
struct.Splice
struct.Without a return value;
splice
which eagerly does the replace and returns ().The text was updated successfully, but these errors were encountered: