Fix TODOs in into_impl.rs: implement GetMany and simplify collect - #4153
Merged
Kenny Kerr (kennykerr) merged 4 commits intoApr 7, 2026
Conversation
Agent-Logs-Url: https://github.com/microsoft/windows-rs/sessions/b9349825-df66-40e5-9ea3-4be836fa20d2 Co-authored-by: kennykerr <9845234+kennykerr@users.noreply.github.com>
…tMany Agent-Logs-Url: https://github.com/microsoft/windows-rs/sessions/b9349825-df66-40e5-9ea3-4be836fa20d2 Co-authored-by: kennykerr <9845234+kennykerr@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Kenny Kerr (kennykerr)
April 7, 2026 17:12
View session
Collaborator
|
Copilot fmt failed |
Agent-Logs-Url: https://github.com/microsoft/windows-rs/sessions/b005648c-6311-4253-ba6a-b25c9bcf4ba5 Co-authored-by: kennykerr <9845234+kennykerr@users.noreply.github.com>
Contributor
Author
Collaborator
|
Copilot check build failure |
Agent-Logs-Url: https://github.com/microsoft/windows-rs/sessions/ce83c48d-d7ad-48ca-a455-0799a046f2e6 Co-authored-by: kennykerr <9845234+kennykerr@users.noreply.github.com>
Contributor
Author
Fixed in 97a5011. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two stale TODOs in
crates/tests/libs/implement/tests/into_impl.rs— array support viaGetManyand a commented-outcollect()call.GetMany: Waspanic!()with a TODO. Now properly implemented: reads current position, copiesactual = min(remaining, capacity)elements fromVec<T>into[T::Default]via.zip(), advances the position. AddedT: Into<<T as Type<T>>::Default>to both struct declarations and implwhereclauses (required so theimplementmacro can generate valid vtable boilerplate; holds for allRuntimeTypes: value/copy types haveT::Default = T; interface types satisfyT: Into<Option<T>>).collect():source.collect()doesn't compile becauseIIterable<T>implementsIntoIterator, notIterator. Replaced the manual for-loop workaround with the correct idiom: