fix(collect): say "1 binary", not "1 binaryy" - #82
Open
cargo-affected-bot wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
collectprints "1 binaryy" on every run.The map-export line interpolates the plural suffix after the whole noun —
"…for {} binary{s}…"withsbound to"y"/"ies"— but "binary"/"binaries" splits mid-word, so theyis 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:
after:
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} testscounts are left alone — those read as the project's existing style rather than a string that is wrong for every value ofn.Tests
binaries_phrase_splits_the_noun_not_the_suffixcovers 0/1/2. Verified failing against the pre-fix expression:left: "0 binaryies", right: "0 binaries".cargo testgreen (113 unit + 41 functional);cargo clippy --all-targetsclean.