提交 5dce0e66 编写于 作者: A allaboutevemirolive

Redefine the pluralize macro's arm

上级 fe5f5912
......@@ -23,8 +23,9 @@
#[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" }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册