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

btreemap and not-btreemap should not be mutually exclusive #44

Open
stepancheg opened this issue Oct 30, 2022 · 3 comments
Open

btreemap and not-btreemap should not be mutually exclusive #44

stepancheg opened this issue Oct 30, 2022 · 3 comments

Comments

@stepancheg
Copy link

If there are two crates in dependency tree of a project, and one crate requests no-btreemap, and other requests btreemap, first one won't compile.

@michaelsproul
Copy link
Owner

Do you mind creating a repo with a demo of this issue? I would have thought that Cargo's dependency resolution would take the union of features and enable the btreemap feature for both: https://doc.rust-lang.org/cargo/reference/resolver.html#features

@stepancheg
Copy link
Author

would take the union of features and enable the btreemap feature for both

Exactly. So if someone relies on it being hash, code will be broken (Ord is now required where Hash was expected). But also performance will be different.

@michaelsproul
Copy link
Owner

Mm, I guess a better solution is to have both variants available in the crate and then users can import and use whichever one they want. I'd accept a pull request to do this if you have time (I don't have time to do it myself, sorry).

We'd also need to publish a new release v0.4.0 as we'd be changing the public API quite drastically.

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

No branches or pull requests

2 participants