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
The current example for Vec::splice illustrates the replacement of a section of length 2 with a new section of length 2. This isn't a particularly interesting case for splice, and makes it look a bit like a shorthand for the kind of manipulations that could be done with a mutable slice.
I think it would be more useful to illustrate this method with a case where the source and replacement are different lengths, e.g.
The current example for
Vec::splice
illustrates the replacement of a section of length 2 with a new section of length 2. This isn't a particularly interesting case for splice, and makes it look a bit like a shorthand for the kind of manipulations that could be done with a mutable slice.I think it would be more useful to illustrate this method with a case where the source and replacement are different lengths, e.g.
Thoughts?
The text was updated successfully, but these errors were encountered: