Skip to content
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

simplify code for adapting (Named)Tuples and fix adapting NamedTuple() #20

Merged
merged 1 commit into from
Dec 2, 2019

Conversation

marius311
Copy link
Contributor

I simplified the code for adapting Tuples and NamedTuples without breaking any of the tests (I'm not seeing any other obvious impact on inferability or allocations). I also fixed the fact that previously adapt(NamedTuple()) was returning Tuple() instead of NamedTuple() (and added a test for this).

@MikeInnes
Copy link
Contributor

Seems reasonable to me. Not sure who wrote this code but @maleadt might want to check it looks ok.

@maleadt
Copy link
Member

maleadt commented Dec 2, 2019

Sorry, forgot about this. LGTM!

@maleadt maleadt merged commit 7f04253 into JuliaGPU:master Dec 2, 2019
@marius311
Copy link
Contributor Author

I know its not much, but any chance of a release including this fix? The adapt(NamedTuple()) bug causes me to need to be on master of this package and makes reproducing the necessary environment harder.

@maleadt
Copy link
Member

maleadt commented Feb 5, 2020

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants