We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 526f2bf commit b2db973Copy full SHA for b2db973
1 file changed
src/libcore/str/mod.rs
@@ -1940,7 +1940,8 @@ impl StrExt for str {
1940
if index == 0 || index == self.len() { return true; }
1941
match self.as_bytes().get(index) {
1942
None => false,
1943
- Some(&b) => b < 128 || b >= 192,
+ // This is bit magic equivalent to: b < 128 || b >= 192
1944
+ Some(&b) => (b as i8) >= -0x40,
1945
}
1946
1947
0 commit comments