mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
37d9ea745b
`scan_escape` currently has a fast path (for when the first char isn't '\\') and a slow path. This commit changes `scan_escape` so it only handles the slow path, i.e. the actual escaping code. The fast path is inlined into the two call sites. This change makes the code faster, because there is no function call overhead on the fast path. (`scan_escape` is a big function and doesn't get inlined.) This change also improves readability, because it removes a bunch of mode checks on the the fast paths. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |