Closed frankmcsherry closed 1 month ago
Thanks! We can discuss the arg further, but yes I think better than we have before, and less ambiguous for values (for which V
could be lots of things, because the function could plausibly produce any type). The only risk I see is that we have lost some flexibility (that we could add back) by only producing the Owned
types.
This PR removes the
KeyOwned
associated type, replacing it with generic parameters that GATs must implementIntoOwned
into. These requirements are meant to be relaxed to those moments where something owned is needed, and they can potentially be avoided entirely for logic that does not required owned types.The PR also tidies the
Val<'_>
GATs to follow the same idiom, where they previously required a function to map toV
.