Skip to content

Calculate the exact capacity for 2 HashMaps - #52435

Merged
bors merged 1 commit into
rust-lang:masterfrom
ljedrz:misc_capacity
Jul 17, 2018
Merged

Calculate the exact capacity for 2 HashMaps#52435
bors merged 1 commit into
rust-lang:masterfrom
ljedrz:misc_capacity

Conversation

@ljedrz

Copy link
Copy Markdown
Contributor

No description provided.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 16, 2018
Comment threadsrc/librustc_driver/profile/trace.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing comma between String and QueryMetric.

@estebank

Copy link
Copy Markdown
Contributor

@ljedrz if you have time, please fix the formatting nitpick, in the meantime, I'm approving as is.

@bors r+ rollup

@bors

bors commented Jul 16, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 20d7ffa7b9cec959c53dd67646068901766648e0 has been approved by estebank

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 16, 2018
@ljedrz

Copy link
Copy Markdown
ContributorAuthor

No problem, done.

@kennytmkennytm removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 16, 2018
@kennytm

Copy link
Copy Markdown
Member

@bors r=estebank

@bors

bors commented Jul 16, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit d85bcef has been approved by estebank

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 16, 2018
@kennytmkennytm mentioned this pull request Jul 16, 2018
let mut id2name = HashMap::with_capacity(build.crates.len());
for (name, krate) in build.crates.iter() {
id2name.insert(krate.id.clone(), name.clone());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For what it's worth, this one could also be done with map() followed by collect().

kennytm added a commit to kennytm/rust that referenced this pull request Jul 17, 2018
bors added a commit that referenced this pull request Jul 17, 2018
Rollup of 9 pull requests
Successful merges:
- #52286 (Deny bare trait objects in src/librustc_errors)
- #52306 (Reduce the number of clone()s needed in obligation_forest)
- #52338 (update miri)
- #52385 (Pass edition flags to compiler from rustdoc as expected)
- #52392 (AsRef doc wording tweaks)
- #52430 (update nomicon)
- #52434 (Enable incremental independent of stage)
- #52435 (Calculate the exact capacity for 2 HashMaps)
- #52446 (Block beta if clippy breaks.)
r? @ghost
@bors
bors merged commit d85bcef into rust-lang:masterJul 17, 2018
@ljedrz
ljedrz deleted the misc_capacity branch July 17, 2018 15:50
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@ljedrz@rust-highfive@estebank@bors@kennytm@nnethercote