Replies: 2 comments
-
|
Actually, worked around by just keeping temporary vectors around. I think I'm going to keep it this way for this kind of usage, so this issue is no longer pressing or blocking. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This is nice idea. I will think about this style of API. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to write the following code:
Rust doesn't like it, because both closures happen to access
src_stages/dst_stages. But technically, we know that the second closure should be invoked on a slice, after the iterator is fully consumed. So I think there is a way here to expose this constraint via the API.Perhaps, it would work nice if the API looked like this:
This way Rust compiler would see that the iterator is consumed separately from the slice processing, and would allow us to do this.
I'm currently thinking of the best ways to work around this, and it's not obvious, unfortunately.
Beta Was this translation helpful? Give feedback.
All reactions