Repository: starship/starship
File: src/modules/git_commit.rs (Rust)

Code before:
    fn test_latest_tag_shown_with_tag_enabled_lightweight() -> io::Result<()> {
        let repo_dir = fixture_repo(FixtureProvider::Git)?;

        let mut git_commit = create_command("git")?
            .args(["rev-parse", "HEAD"])
            .current_dir(repo_dir.path())
            .output()?
            .stdout;
        git_commit.truncate(7);
        let commit_output = str::from_utf8(&git_commit).unwrap().trim();

        // Lightweight tags are chosen lexicographically
        create_command("git")?
            .args(["tag", "v1"])
            .env("GIT_COMMITTER_DATE", "2022-01-01 00:00:00 +0000")
            .current_dir(repo_dir.path())
            .output()?;

        create_command("git")?
            .args(["tag", "v0", "HEAD~1"])
            .env("GIT_COMMITTER_DATE", "2022-01-01 00:00:01 +0000")
            .current_dir(repo_dir.path())
            .output()?;

        create_command("git")?
            .args(["tag" , "v2"])
            .env("GIT_COMMITTER_DATE", "2022-01-01 00:00:01 +0000")
            .current_dir(repo_dir.path())
            .output()?;

        let git_tag = create_command("git")?
            .args(["describe", "--tags"])
            .current_dir(repo_dir.path())
            .output()?
            .stdout;
        let tag_output = str::from_utf8(&git_tag).unwrap().trim();

        let expected_output = format!("{commit_output} {tag_output}");

        let actual = ModuleRenderer::new("git_commit")
            .config(toml::toml! {
                [git_commit]
                    only_detached = false
                    tag_disabled = false
                    tag_symbol = " "
            })
            .path(repo_dir.path())
            .collect();

        let expected = Some(format!(
            "{} ",

Review comment (bug):
This change is making cargo fmt fail is you change this to

```suggestion
            .args(["tag", "v2"])
```

It should pass


Code after:
    fn test_latest_tag_shown_with_tag_enabled_lightweight() -> io::Result<()> {
        let repo_dir = fixture_repo(FixtureProvider::Git)?;

        let mut git_commit = create_command("git")?
            .args(["rev-parse", "HEAD"])
            .current_dir(repo_dir.path())
            .output()?
            .stdout;
        git_commit.truncate(7);
        let commit_output = str::from_utf8(&git_commit).unwrap().trim();

        // Lightweight tags are chosen lexicographically
        create_command("git")?
            .args(["tag", "v1"])
            .env("GIT_COMMITTER_DATE", "2022-01-01 00:00:00 +0000")
            .current_dir(repo_dir.path())
            .output()?;

        create_command("git")?
            .args(["tag", "v0", "HEAD~1"])
            .env("GIT_COMMITTER_DATE", "2022-01-01 00:00:01 +0000")
            .current_dir(repo_dir.path())
            .output()?;

        create_command("git")?
            .args(["tag", "v2"])
            .env("GIT_COMMITTER_DATE", "2022-01-01 00:00:01 +0000")
            .current_dir(repo_dir.path())
            .output()?;

        let git_tag = create_command("git")?
            .args(["describe", "--tags"])
            .current_dir(repo_dir.path())
            .output()?
            .stdout;
        let tag_output = str::from_utf8(&git_tag).unwrap().trim();

        let expected_output = format!("{commit_output} {tag_output}");

        let actual = ModuleRenderer::new("git_commit")
            .config(toml::toml! {
                [git_commit]
                    only_detached = false
                    tag_disabled = false
                    tag_symbol = " "
            })
            .path(repo_dir.path())
            .collect();

        let expected = Some(format!(
            "{} ",