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

Add Order as const generic #10

Merged
merged 2 commits into from
Mar 31, 2021
Merged

Conversation

vinaychandra
Copy link
Contributor

@vinaychandra vinaychandra commented Mar 14, 2021

This PR allows to switch from the default 32 level heap to a generic heap that could be of any level.

This is a breaking change because #![feature(const_generics_defaults)] is incomplete.

Resolves #9

@jiegec
Copy link
Member

jiegec commented Mar 14, 2021

Great idea! But to maintain compatibility, can we:

  1. rename Heap to another name
  2. alias Heap as 32-ordered heap
  3. or should we wait for const_generics_defaults?

@vinaychandra
Copy link
Contributor Author

vinaychandra commented Mar 14, 2021

I can update Heap to OrderedHeap and then alias Heap to OrderedHeap<32>. const_generics_defaults can take a long time.
But again, the current change also doesn't work in stable because const generics is stablized only in nightly. Is that acceptable?

@jiegec
Copy link
Member

jiegec commented Mar 15, 2021

I can update Heap to OrderedHeap and then alias Heap to OrderedHeap<32>. const_generics_defaults can take a long time.
But again, the current change also doesn't work in stable because const generics is stablized only in nightly. Is that acceptable?

It seems not far: https://blog.rust-lang.org/2021/02/26/const-generics-mvp-beta.html

@jiegec
Copy link
Member

jiegec commented Mar 25, 2021

Here it is: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html. Let's try new stable on this pr.

Let's wait for CI to bump to 1.51.0.

@jiegec jiegec merged commit 026a647 into rcore-os:master Mar 31, 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.

Order 32 is restricting for 64 bit machines
2 participants