Skip to content

couple of clippy::style changes #113978

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

Merged
merged 2 commits into from
Jul 24, 2023
Merged

Conversation

matthiaskrgr
Copy link
Member

comparison_to_empty
iter_nth_zero
for_kv_map
manual_next_back
redundant_pattern

get_first
single_char_add_str
unnecessary_mut_passed
manual_map
manual_is_ascii_check

@rustbot
Copy link
Collaborator

rustbot commented Jul 23, 2023

r? @eholk

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 23, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 23, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@@ -3014,7 +3014,7 @@ impl FieldDef<'_> {
// Still necessary in couple of places
pub fn is_positional(&self) -> bool {
let first = self.ident.as_str().as_bytes()[0];
(b'0'..=b'9').contains(&first)
first.is_ascii_digit()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
first.is_ascii_digit()
self.ident.as_str().as_bytes()[0].is_ascii_digit()

s.push_str(&v.join(", "));
s.push_str("]");
s.push(']');
s
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
s
format!("[{}]", v.join(", "))

@fee1-dead
Copy link
Member

r? @fee1-dead
@rustbot author

@rustbot rustbot assigned fee1-dead and unassigned eholk Jul 23, 2023
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2023
comparison_to_empty
iter_nth_zero
for_kv_map
manual_next_back
redundant_pattern
get_first
single_char_add_str
unnecessary_mut_passed
manual_map
manual_is_ascii_check
@matthiaskrgr matthiaskrgr force-pushed the clippy_072023_style branch from e949a3a to af2b370 Compare July 23, 2023 21:39
@matthiaskrgr
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 23, 2023
Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

@bors r+ rollup

@fee1-dead
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 24, 2023

📌 Commit af2b370 has been approved by fee1-dead

It is now in the queue for this repository.

@bors bors 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 24, 2023
@bors
Copy link
Collaborator

bors commented Jul 24, 2023

⌛ Testing commit af2b370 with merge 155a5c2...

@bors
Copy link
Collaborator

bors commented Jul 24, 2023

☀️ Test successful - checks-actions
Approved by: fee1-dead
Pushing 155a5c2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 24, 2023
@bors bors merged commit 155a5c2 into rust-lang:master Jul 24, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 24, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (155a5c2): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 652.153s -> 652.237s (0.01%)

@lcnr lcnr removed the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Jul 28, 2023
@matthiaskrgr matthiaskrgr deleted the clippy_072023_style branch January 25, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants