display boolean config options as true/false instead of Yes/No (#3043)

This commit is contained in:
ammkrn
2021-02-11 02:50:33 -06:00
committed by GitHub
parent 8367f2001c
commit aa564f5072
5 changed files with 24 additions and 24 deletions

View File

@ -251,12 +251,12 @@ impl PrettyDebug for FormatInlineShape {
InlineShape::GlobPattern(pattern) => DbgDocBldr::primitive(pattern),
InlineShape::Boolean(boolean) => DbgDocBldr::primitive(
match (boolean, column) {
(true, None) => "Yes",
(false, None) => "No",
(true, None) => "true",
(false, None) => "false",
(true, Some(Column::String(s))) if !s.is_empty() => s,
(false, Some(Column::String(s))) if !s.is_empty() => "",
(true, Some(_)) => "Yes",
(false, Some(_)) => "No",
(true, Some(_)) => "true",
(false, Some(_)) => "false",
}
.to_owned(),
),

View File

@ -314,12 +314,12 @@ pub fn format_primitive(primitive: &Primitive, field_name: Option<&String>) -> S
f
}
Primitive::Boolean(b) => match (b, field_name) {
(true, None) => "Yes",
(false, None) => "No",
(true, None) => "true",
(false, None) => "false",
(true, Some(s)) if !s.is_empty() => s,
(false, Some(s)) if !s.is_empty() => "",
(true, Some(_)) => "Yes",
(false, Some(_)) => "No",
(true, Some(_)) => "true",
(false, Some(_)) => "false",
}
.to_owned(),
Primitive::Binary(_) => "<binary>".to_owned(),