Rollup merge of #70708 - Pocakking:fix-ascii-case-conv-typo, r=sfackler

Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase

Corrects misspelling of fifth.
This commit is contained in:
Mazdak Farrokhzad 2020-04-03 00:32:07 +02:00 committed by GitHub
commit 2f28058a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4376,7 +4376,7 @@ pub const fn is_ascii(&self) -> bool {
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[inline]
pub fn to_ascii_uppercase(&self) -> u8 {
// Unset the fith bit if this is a lowercase letter
// Unset the fifth bit if this is a lowercase letter
*self & !((self.is_ascii_lowercase() as u8) << 5)
}
@ -4399,7 +4399,7 @@ pub fn to_ascii_uppercase(&self) -> u8 {
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[inline]
pub fn to_ascii_lowercase(&self) -> u8 {
// Set the fith bit if this is an uppercase letter
// Set the fifth bit if this is an uppercase letter
*self | ((self.is_ascii_uppercase() as u8) << 5)
}