We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41fe75e commit e9f628eCopy full SHA for e9f628e
library/core/src/num/mod.rs
@@ -549,7 +549,7 @@ impl u8 {
549
#[rustc_const_stable(feature = "const_ascii_methods_on_intrinsics", since = "1.52.0")]
550
#[inline]
551
pub const fn to_ascii_uppercase(&self) -> u8 {
552
- // Toggle the fifth bit if this is a lowercase letter
+ // Toggle the 6th bit if this is a lowercase letter
553
*self ^ ((self.is_ascii_lowercase() as u8) * ASCII_CASE_MASK)
554
}
555
@@ -574,7 +574,7 @@ impl u8 {
574
575
576
pub const fn to_ascii_lowercase(&self) -> u8 {
577
- // Set the fifth bit if this is an uppercase letter
+ // Set the 6th bit if this is an uppercase letter
578
*self | (self.is_ascii_uppercase() as u8 * ASCII_CASE_MASK)
579
580
0 commit comments