Skip to content

refactor: remove all regexes #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

Rudxain
Copy link
Contributor

@Rudxain Rudxain commented May 16, 2025

Since all of the patterns are const, I think it might be a good idea to transpile them to Rust

@Rudxain Rudxain force-pushed the rm-regex branch 2 times, most recently from e2bce9a to 4e7299a Compare May 16, 2025 04:49
@cocool97
Copy link
Owner

I truly don't think this makes the code more readable... There are a lot of tools that help "dissecting" regexes and I think this makes the code more readable. I prefer not to merge it but thanks for the work ! :)

@cocool97 cocool97 closed this May 24, 2025
@Rudxain
Copy link
Contributor Author

Rudxain commented May 24, 2025

Fair enough. Aside from readability, I wanted to reduce dependencies, as I've seen PRs doing that.

I was worried that my "translation" might have bugs 😅, especially considering the weird edge-cases that DEVICES_LONG_REGEX handles (such as \s* instead of the common \s+)

get_emulator_port seems more readable to me 😕

BTW, I forgot to dedupe its body. I was unsure if it was better inlined or not

@Rudxain Rudxain deleted the rm-regex branch May 24, 2025 16:39
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