Commit 83b5f01
committed
[WhitespaceLinter] Use hand crafted "is whitespace" function
* `UnicodeScalar(_:)` on arbitrary UTF8 code point was wrong. It only
works correctly if the code point is < 0x80
* `UnicodeScalar.Properties.isWhitespace` is slow. Profiling 'lint'
shows it's taking 13.6 of the entire time
* Whitespaces in Unicode "Basic Latin" block are well defined, there's
no need to consult `UnicodeScalar.Properties`1 parent 6e64b26 commit 83b5f01
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
342 | 350 | | |
343 | | - | |
344 | | - | |
| 351 | + | |
345 | 352 | | |
346 | 353 | | |
347 | 354 | | |
| |||
0 commit comments