Skip to content

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Sep 16, 2025

This changes partition_source so that instead of allocating new strings,
it just returns slices into the original string. It probably doesn't
make a big difference perf-wise, but I felt more comfortable with this,
and also felt it was a little easier to understand exactly what it was
doing.

This is generally equivalent except for the possibility of not having a
newline at the end. In practice that doesn't matter because markdown
code blocks always have a newline. However, to be defensive, the caller
will check for this.

This changes partition_source so that instead of allocating new strings,
it just returns slices into the original string. It probably doesn't
make a big difference perf-wise, but I felt more comfortable with this,
and also felt it was a little easier to understand exactly what it was
doing.

This is generally equivalent except for the possibility of not having a
newline at the end. In practice that doesn't matter because markdown
code blocks always have a newline. However, to be defensive, the caller
will check for this.
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Sep 16, 2025
@ehuss ehuss enabled auto-merge September 16, 2025 01:43
@ehuss ehuss added this pull request to the merge queue Sep 16, 2025
Merged via the queue into rust-lang:master with commit fb4fa86 Sep 16, 2025
14 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants