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

minor code cleanups #105625

Merged
merged 1 commit into from
Dec 13, 2022
Merged

minor code cleanups #105625

merged 1 commit into from
Dec 13, 2022

Conversation

matthiaskrgr
Copy link
Member

@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. labels Dec 12, 2022
Comment on lines 9 to 13
pub const ALPHANUMERIC_ONLY: usize = 62;
pub const CASE_INSENSITIVE: usize = 36;

const BASE_64: &[u8; MAX_BASE as usize] =
const BASE_64: &[u8; MAX_BASE] =
b"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@$";
Copy link
Member Author

Choose a reason for hiding this comment

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

MAX_BASE is already declared usize at line 8

@@ -209,7 +209,7 @@ impl<T: Idx> BitSet<T> {
self.words[start_word_index] |= !(start_mask - 1);
// And all trailing bits (i.e. from 0..=end) in the end word,
// including the end.
self.words[end_word_index] |= end_mask | end_mask - 1;
self.words[end_word_index] |= end_mask | (end_mask - 1);
Copy link
Member

Choose a reason for hiding this comment

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

lol was this a bug? or is the precedence alright implicitly like those parens?

Copy link
Member Author

Choose a reason for hiding this comment

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

according to clippy the precedence was already like this but since its no obvious it suggested the parens 🙃

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 12, 2022

📌 Commit 2ea368e has been approved by compiler-errors

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 Dec 12, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#104864 (Account for item-local in inner scope for E0425)
 - rust-lang#105332 (Point out the type of associated types in every method call of iterator chains)
 - rust-lang#105620 (Remove unnecessary uses of `clone`)
 - rust-lang#105625 (minor code cleanups)
 - rust-lang#105629 (rustdoc: stop treating everything in a trait item as a method)
 - rust-lang#105636 (Add check for local-storage value when changing "display line numbers" settings)
 - rust-lang#105639 (rustdoc: remove `type="text/css" from stylesheet links)
 - rust-lang#105640 (Adjust miri to still be optional)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2707801 into rust-lang:master Dec 13, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants