Fix plurals in abbrevations (#409)

This commit is contained in:
JT 2021-12-03 10:36:54 +13:00 committed by GitHub
parent 19766556f3
commit d9bedaae2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,8 +345,16 @@ impl Value {
)
}
Value::String { val, .. } => val,
Value::List { vals: val, .. } => format!("[list {} items]", val.len()),
Value::Record { cols, .. } => format!("{{record {} fields}}", cols.len()),
Value::List { vals: val, .. } => format!(
"[list {} item{}]",
val.len(),
if val.len() == 1 { "" } else { "s" }
),
Value::Record { cols, .. } => format!(
"{{record {} field{}}}",
cols.len(),
if cols.len() == 1 { "" } else { "s" }
),
Value::Block { val, .. } => format!("<Block {}>", val),
Value::Nothing { .. } => String::new(),
Value::Error { error } => format!("{:?}", error),