From 0048fd5e2d6c6217994e4a00b4dfb22086672fba Mon Sep 17 00:00:00 2001 From: Mahmud Bello <75342173+mahmudsudo@users.noreply.github.com> Date: Tue, 23 Jan 2024 21:43:50 +0100 Subject: [PATCH 1/2] Update mod.rs The documentation is incorrect as the determinant for lower or upper case is the 5th bit not the 6th bit as written in the codebase. --- library/core/src/num/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index c2b646b9b3e4a..a5b42e86af536 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -478,7 +478,7 @@ impl isize { } } -/// If the 6th bit is set ascii is lower case. +/// If the 5th bit is set ascii is lower case. const ASCII_CASE_MASK: u8 = 0b0010_0000; impl u8 { From aed670dc15dd29a71110933ce300dee08b0a4467 Mon Sep 17 00:00:00 2001 From: Mahmud Bello <75342173+mahmudsudo@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:16:27 +0100 Subject: [PATCH 2/2] Update library/core/src/num/mod.rs adequate changes made Co-authored-by: Mark Rousskov --- library/core/src/num/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index a5b42e86af536..8ac57528f3e02 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -478,7 +478,7 @@ impl isize { } } -/// If the 5th bit is set ascii is lower case. +/// If the bit selected by this mask is set, ascii is lower case. const ASCII_CASE_MASK: u8 = 0b0010_0000; impl u8 {