mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
5da0b6cf1c
Replace custom trim_ascii_start with the standard library method The markdown parser in `rustc_errors` has a local `trim_ascii_start` function that strips leading ASCII whitespace from a byte slice. The standard library has had `<[u8]>::trim_ascii_start()` since Rust 1.80, which does the same thing. This PR removes the custom function and calls the stdlib method directly in `parse_unordered_li` and `parse_ordered_li`. No behaviour change. I also added a test covering the list item leading-whitespace trimming behaviour, including a tab case. Fixes rustfoundation/interop-initiative#53