Skip to content

Commit

Permalink
Rollup merge of #70708 - Pocakking:fix-ascii-case-conv-typo, r=sfackler
Browse files Browse the repository at this point in the history
Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase

Corrects misspelling of fifth.
  • Loading branch information
Centril authored Apr 2, 2020
2 parents 8a8abc6 + 354ddbf commit 6436059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4376,7 +4376,7 @@ impl u8 {
#[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)
}

Expand All @@ -4399,7 +4399,7 @@ impl 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)
}

Expand Down

0 comments on commit 6436059

Please sign in to comment.