Skip to content
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

Add fmt command #510

Merged
merged 2 commits into from
May 3, 2024
Merged

Add fmt command #510

merged 2 commits into from
May 3, 2024

Conversation

GuillaumeGomez
Copy link
Member

No description provided.

}

let cmd: &[&dyn AsRef<OsStr>] =
if check { &[&"cargo", &"fmt", &"--check"] } else { &[&"cargo", &"fmt"] };
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we just forward the arguments to cargo fmt directly instead of handling this ourselves?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, we only want --check and --help, so better handle the available options ourselves imo.

fn show_usage() {
println!(
r#"
`test` command help:
Copy link
Contributor

Choose a reason for hiding this comment

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

You meant?

Suggested change
`test` command help:
`fmt` command help:

Copy link
Member Author

Choose a reason for hiding this comment

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

Woups.

@GuillaumeGomez
Copy link
Member Author

Updated!

@antoyo antoyo merged commit d7c8e0f into rust-lang:master May 3, 2024
34 checks passed
@GuillaumeGomez GuillaumeGomez deleted the fmt-cmd branch May 3, 2024 12:08
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.

None yet

2 participants