This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 213ad10
committed
Auto merge of rust-lang#121150 - Swatinem:debug-ascii-str, r=joboet
Add a fast-path to `Debug` ASCII `&str`
Instead of going through the `EscapeDebug` machinery, we can just skip over ASCII chars that don’t need any escaping.
---
This is an alternative / a companion to rust-lang#121138.
The other PR is adding the fast path deep within `EscapeDebug`, whereas this skips as early as possible.2 files changed
+43
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2402 | 2402 | | |
2403 | 2403 | | |
2404 | 2404 | | |
2405 | | - | |
2406 | | - | |
2407 | | - | |
2408 | | - | |
2409 | | - | |
2410 | | - | |
2411 | | - | |
2412 | | - | |
2413 | | - | |
2414 | | - | |
2415 | | - | |
2416 | | - | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
2417 | 2438 | | |
2418 | | - | |
| 2439 | + | |
2419 | 2440 | | |
| 2441 | + | |
2420 | 2442 | | |
2421 | | - | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
2422 | 2446 | | |
2423 | 2447 | | |
2424 | 2448 | | |
| |||
2434 | 2458 | | |
2435 | 2459 | | |
2436 | 2460 | | |
2437 | | - | |
| 2461 | + | |
2438 | 2462 | | |
2439 | 2463 | | |
2440 | 2464 | | |
2441 | | - | |
2442 | | - | |
2443 | | - | |
| 2465 | + | |
| 2466 | + | |
2444 | 2467 | | |
2445 | 2468 | | |
2446 | 2469 | | |
| |||
0 commit comments