Skip to content

Stop using scan_ch when get will do#1003

Merged
Martin1887 merged 1 commit intopulldown-cmark:masterfrom
notriddle:notriddle/scan-ch-in-conditional
Jan 11, 2025
Merged

Stop using scan_ch when get will do#1003
Martin1887 merged 1 commit intopulldown-cmark:masterfrom
notriddle:notriddle/scan-ch-in-conditional

Conversation

@notriddle
Copy link
Collaborator

That scanner, which returns usize, makes sense when actual offset arithmetic is being done. But it's overkill for checking if a character exists.

Since slice::get is in the standard library, use that.

That scanner, which returns `usize`, makes sense when actual
offset arithmetic is being done. But it's overkill for checking
if a character exists.

Since `slice::get` is in the standard library, use that.
@Martin1887 Martin1887 merged commit 97843e6 into pulldown-cmark:master Jan 11, 2025
6 checks passed
@notriddle notriddle deleted the notriddle/scan-ch-in-conditional branch January 11, 2025 16:19
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