Skip to content

fix(collect): say "1 binary", not "1 binaryy" - #82

Open
cargo-affected-bot wants to merge 1 commit into
mainfrom
fix/collect-binary-plural
Open

fix(collect): say "1 binary", not "1 binaryy"#82
cargo-affected-bot wants to merge 1 commit into
mainfrom
fix/collect-binary-plural

Conversation

@cargo-affected-bot

Copy link
Copy Markdown
Collaborator

collect prints "1 binaryy" on every run.

The map-export line interpolates the plural suffix after the whole noun — "…for {} binary{s}…" with s bound to "y"/"ies" — but "binary"/"binaries" splits mid-word, so the y is already spelled out. Neither branch is ever right: 1 renders "binaryy", 2 renders "binaryies". The adjacent listing line hardcodes "binaries" and so reads "1 binaries".

Observed on a two-test single-binary project, before:

found 2 tests across 1 binaries
exporting coverage maps for 1 binaryy...

after:

found 2 tests across 1 binary
exporting coverage maps for 1 binary...

Change

Both sites go through binaries_phrase(n), which owns the mid-word split and carries the one-line explanation of why this noun can't take the {n} test{s} shape used elsewhere. The bare {n} tests counts are left alone — those read as the project's existing style rather than a string that is wrong for every value of n.

Tests

binaries_phrase_splits_the_noun_not_the_suffix covers 0/1/2. Verified failing against the pre-fix expression: left: "0 binaryies", right: "0 binaries".

cargo test green (113 unit + 41 functional); cargo clippy --all-targets clean.

The map-export line interpolated the plural suffix after the whole noun,
but binary/binaries splits mid-word — so 1 rendered "binaryy" and 2
rendered "binaryies". The adjacent listing line hardcoded "binaries"
and read "1 binaries". Both go through one helper that owns the split.
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.

1 participant