Skip to content

Create a parse_command function to parse rust-timer commands - #2525

Merged
Kobzol merged 1 commit into
rust-lang:mainfrom
JonathanBrouwer:parsing-improvements3
Aug 10, 2026
Merged

Create a parse_command function to parse rust-timer commands#2525
Kobzol merged 1 commit into
rust-lang:mainfrom
JonathanBrouwer:parsing-improvements3

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This separates the parsing code from the logic and makes the tests cover more of the parsing logic.
This is the last refactor to this file for now before I will add new things to it.

I would again recommend enabling "Hide whitespace" while reviewing

r? @Kobzol

@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

^ Rebased on top of the force pushed main branch to solve conflicts

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, this is much more readable than before!

assert!(parse_build_command("").is_none());
fn command_missing() {
insta::assert_compact_debug_snapshot!(parse_command(""),
@r#"Err("Cannot find @rust-timer command even though `@rust-timer` is tagged")"#);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This error message is misleading, because the test code doesn't have the if condition that gets executed on the live service, but that doesn't matter much.

@Kobzol
Kobzol enabled auto-merge August 10, 2026 08:48
@Kobzol
Kobzol added this pull request to the merge queue Aug 10, 2026
Merged via the queue into rust-lang:main with commit 39c6489 Aug 10, 2026
15 checks passed
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