Skip to content

Commit 7f34376

Browse files
committed
Auto merge of #115066 - allaboutevemirolive:pluralize_macro, r=Nilstrieb
Redefine the pluralize macro's arm Redefine the unintuitive pluralize macro's arm because of the negation. The initial code starts with check if count is not 1, which is confusing and unintuitive. The arm shoud start with checking, - if "count" `is 1` then, append `""` (empty string) - indicate as singular - Then check if "count" `is not 1` (more than 1), append `"s"` - indicate as plural Before: ```rs // This arm is abit confusing since it start with checking, if "count" is more than 1, append "s". ($x:expr) => { if $x != 1 { "s" } else { "" } }; ``` After: ```rs // Pluralize based on count (e.g., apples) ($x:expr) => { if $x == 1 { "" } else { "s" } }; ```
2 parents e0126aa + 0642584 commit 7f34376

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)