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

Expose the Layout of the failed allocation in CollectionAllocErr::AllocErr #89

Merged
merged 1 commit into from Jun 12, 2019

Conversation

SimonSapin
Copy link
Contributor

This a breaking change to a public API.

This enables a similar change proposed in std: rust-lang/rust#48043 (comment)

There is precedent for this in the hashglobe crate, which is Firefox’s (pre-hashbrown) fork of std::collections::HashMap with stable try_reserve.

@Amanieu
Copy link
Member

Amanieu commented Jun 12, 2019

Travis is sad about the lack of rustfmt. Otherwise LGTM

…ocErr

This a breaking change to a public API.

This enables a similar change proposed in `std`:
rust-lang/rust#48043 (comment)

There is precedent for this in the `hashglobe` crate,
which is Firefox’s (pre-hashbrown) fork of `std::collections::HashMap`
with stable `try_reserve`.

* https://github.com/servo/servo/blob/b3eed5b5bd/components/hashglobe/src/lib.rs#L29-L42
* https://github.com/servo/servo/blob/b3eed5b5bd/components/hashglobe/src/hash_map.rs#L722
@SimonSapin
Copy link
Contributor Author

Ah, the one-character diff :)

Fixed.

@Amanieu
Copy link
Member

Amanieu commented Jun 12, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 12, 2019

📌 Commit c2e26e7 has been approved by Amanieu

bors added a commit that referenced this pull request Jun 12, 2019
Expose the Layout of the failed allocation in CollectionAllocErr::AllocErr

This a breaking change to a public API.

This enables a similar change proposed in `std`: rust-lang/rust#48043 (comment)

There is precedent for this in the `hashglobe` crate, which is Firefox’s (pre-hashbrown) fork of `std::collections::HashMap` with stable `try_reserve`.

* https://github.com/servo/servo/blob/b3eed5b5bd/components/hashglobe/src/lib.rs#L29-L42
* https://github.com/servo/servo/blob/b3eed5b5bd/components/hashglobe/src/hash_map.rs#L722
@bors
Copy link
Collaborator

bors commented Jun 12, 2019

⌛ Testing commit c2e26e7 with merge 2c16341...

@bors
Copy link
Collaborator

bors commented Jun 12, 2019

☀️ Test successful - checks-travis
Approved by: Amanieu
Pushing 2c16341 to master...

@bors bors merged commit c2e26e7 into rust-lang:master Jun 12, 2019
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.

None yet

3 participants