Redefine the pluralize macro's arm

This commit is contained in:
allaboutevemirolive 2023-08-21 13:31:58 -04:00
parent fe5f591257
commit 5dce0e66b9

View File

@ -23,8 +23,9 @@ pub mod builtin;
#[macro_export]
macro_rules! pluralize {
// Pluralize based on count (e.g., apples)
($x:expr) => {
if $x != 1 { "s" } else { "" }
if $x == 1 { "" } else { "s" }
};
("has", $x:expr) => {
if $x == 1 { "has" } else { "have" }