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

Replace array impls with const generics #754

Merged
merged 3 commits into from
Apr 7, 2021

Conversation

austinabell
Copy link
Contributor

Closes #752

Not sure if you would like it under a feature to not be a breaking change (if msrv is important), but happy to make that change if so :D

@austinabell austinabell marked this pull request as draft March 31, 2021 22:33
@Robbepop
Copy link
Collaborator

Robbepop commented Apr 1, 2021

Thank you for the PR @austinabell !

Not sure if you would like it under a feature to not be a breaking change (if msrv is important), but happy to make that change if so :D

We won't need to feature flag this since we are on Rust nightly which includes (by definition) the latest Rust 1.51 where this feature has already been stabilized.

@Robbepop
Copy link
Collaborator

Robbepop commented Apr 1, 2021

The CI is currently unhappy due to examples needing to be updated with the updated SCALE codec crate. However, I'd instead love to see support for this in SCALE codec crate prior to merging this PR. Would be cool if you want to spearhead this!

@austinabell
Copy link
Contributor Author

austinabell commented Apr 1, 2021

The CI is currently unhappy due to examples needing to be updated with the updated SCALE codec crate. However, I'd instead love to see support for this in SCALE codec crate prior to merging this PR. Would be cool if you want to spearhead this!

Ah my bad, I thought this was assumed, I should have put that comment in the description. Yeah I'm leaving this PR in draft state until paritytech/parity-scale-codec#261 comes in, then I'll update the reference here and open up the PR.

I was just too lazy to patch all examples since it was a temporary check to make sure everything compiles.

Edit: Also have no rush to release the scale codec, happy to leave this sitting until it does. I don't need this change for anything, just did it for fun

@austinabell austinabell marked this pull request as ready for review April 6, 2021 21:50
Copy link
Collaborator

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Requires update to cargo-contract template.

@austinabell
Copy link
Contributor Author

LGTM

Requires update to cargo-contract template.

That change is merged :) Anything else needed?

@Robbepop
Copy link
Collaborator

Robbepop commented Apr 7, 2021

LGTM
Requires update to cargo-contract template.

That change is merged :) Anything else needed?

Does not look like it to me tbh /~https://github.com/paritytech/cargo-contract/blob/master/templates/new/_Cargo.toml#L14

@austinabell
Copy link
Contributor Author

austinabell commented Apr 7, 2021

LGTM
Requires update to cargo-contract template.

That change is merged :) Anything else needed?

Does not look like it to me tbh /~https://github.com/paritytech/cargo-contract/blob/master/templates/new/_Cargo.toml#L14

oh ooops lol, the different naming threw me off there. That's a dumb mistake, I'll update that now

edit: PR link - use-ink/cargo-contract#252

@Robbepop
Copy link
Collaborator

Robbepop commented Apr 7, 2021

Thanks a lot for your PR @austinabell ! :)

@Robbepop Robbepop merged commit 641fd38 into use-ink:master Apr 7, 2021
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.

Use min_const_generics for trait implementations
3 participants