-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert & insert many #92
Comments
I guess |
I've been on Maybe this function shouldn't be present at all? I mean, @pczarn , what do you think? |
@Jujumba maybe, maybe not, hard to tell. It's true that I haven't ever seen this in Rust, and would expect it still to be useful for someone out there even , Edit: even if rarely, though more often for strings of bits. Not a priority, but I think if you got started it's okay to finish. Further, ferrilabs have |
I've come up with a workaround that from my perspective is reasonable enough: if insertion crosses a block, then a simple way to insert the slice would be to "split" the insertion I'll submit a PR for that soon |
Just looked into ferrilab's |
They do it like this
Also, we should allow this function for |
This first/body/last block may be not quite accurate, I did not read that much of their code. Though essentially you are right about splitting copies, and there are at least two ways to split - state machine or 3x call. |
Did you mean splitting insertions or copies? |
Something like splitting insertions It may be unclear what I mean, so better see the code which I'll send now |
Basically all copies of strings or slices or bits or whatever that can overlap must work for the overlap and users sometimes can say there could be overlap or promise no overlap |
What do you mean by destination and source overlap? Do you mean crossing a block? |
I mean different blocks at the beginning of source and at the end of source and beginning of destination. I recommend drawing it all on paper, how you would like the algorithm to work. |
fn insert
fn insert_many
- needs a good nameThe text was updated successfully, but these errors were encountered: