Skip to content

Replace direct regex crate dependency - #910

Merged
reese merged 2 commits into
trunkfrom
reese-regex-dep
Jun 7, 2026
Merged

Replace direct regex crate dependency#910
reese merged 2 commits into
trunkfrom
reese-regex-dep

Conversation

@reese

@reese reese commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

We currently just have a single usage of the regex crate, which is checking for # rubyfmt: (true|false) magic comments. Using regex for this is a bit overkill, and we can instead use a plain ol' string scan, which (1) is a good bit faster, at least from a quick local benchmark and (2) doesn't require any external dependencies.

@froydnj froydnj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fewer dependencies is more better.

@reese
reese merged commit 52fae76 into trunk Jun 7, 2026
8 checks passed
@reese
reese deleted the reese-regex-dep branch June 7, 2026 19:16
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