Skip to content

Commit

Permalink
Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase
Browse files Browse the repository at this point in the history
fith => fifth
  • Loading branch information
Pocakking committed Apr 2, 2020
1 parent 0f72ce1 commit 354ddbf
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 354ddbf

Please sign in to comment.