Skip to content

use is_empty() instead of len() == x to determine if structs are empty. - #69551

Merged
bors merged 2 commits into
rust-lang:masterfrom
matthiaskrgr:len_zero
Feb 29, 2020
Merged

use is_empty() instead of len() == x to determine if structs are empty.#69551
bors merged 2 commits into
rust-lang:masterfrom
matthiaskrgr:len_zero

Conversation

@matthiaskrgr

Copy link
Copy Markdown
Member

No description provided.

@Mark-SimulacrumMark-Simulacrum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I almost want a "has_items()" but that seems like a pain to add, and shouldn't block this.

r=me with nit fixed

Comment threadsrc/librustc_codegen_ssa/back/write.rs Outdated
@JohnTitorJohnTitor added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 28, 2020
@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Feb 28, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 1622b6e has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 28, 2020
bors added a commit that referenced this pull request Feb 29, 2020
Rollup of 6 pull requests
Successful merges:
- #69477 (docs: add mention of async blocks in move keyword docs)
- #69504 (Use assert_ne in hash tests)
- #69546 (use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.)
- #69551 (use is_empty() instead of len() == x to determine if structs are empty.)
- #69563 (Fix no_std detection for target triples)
- #69567 (use .to_string() instead of format!() macro to create strings)
Failed merges:
r? @ghost
@bors
bors merged commit c8db7dc into rust-lang:masterFeb 29, 2020
@matthiaskrgr
matthiaskrgr deleted the len_zero branch February 29, 2020 14:13
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.

5 participants

@matthiaskrgr@Mark-Simulacrum@bors@JohnTitor@ecstatic-morse