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

Make std imply indexmap/std. #374

Merged
merged 2 commits into from
Sep 9, 2021
Merged

Make std imply indexmap/std. #374

merged 2 commits into from
Sep 9, 2021

Conversation

sunfishcode
Copy link
Contributor

@sunfishcode sunfishcode commented Sep 9, 2021

In src/write/string.rs, StringTable uses IndexSet with one generic
parameter. IndexSet only supports being passed one generic parameter
when indexmap's std feature is enabled. indexmap
attempts to autodetect whether std is supported, but it doesn't
always succeed. This patch explicitly enables indexmap/std when
object's own std feature is enabled, to avoid the autodetection
path.

In src/write/string.rs, `StringTable` uses `IndexSet` with one generic
parameter. `IndexSet` only supports being passed one generic parameter
[when `indexmap`'s `std` feature is enabled]. `indexmap`
[attempts to autodetect] whether `std` is supported, but it doesn't
always succeed. This patch explicitly enables `indexmap/std` when
`object`'s own `std` feature is enabled, to avoid the autodetection
path.

[when its `std` feature is enabled]: https://github.com/bluss/indexmap/blob/master/src/set.rs#L62
[attempts to autodetect]: https://github.com/bluss/indexmap/blob/master/build.rs#L3
Cargo.toml Outdated Show resolved Hide resolved
This avoids unnecessarily depending on `indexmap`.
@philipc philipc merged commit f9a10b6 into gimli-rs:master Sep 9, 2021
mcbegamerxx954 pushed a commit to mcbegamerxx954/object that referenced this pull request Jun 15, 2024
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.

2 participants