-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
minor code cleanups #105625
Conversation
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@$"; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
@bors r+ rollup |
…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
r? @compiler-errors