Respect empty_item_single_line config option when formatting empty impls

This commit is contained in:
Seiichi Uchida 2018-06-06 10:55:25 +09:00
parent d51b99f5d7
commit a4db62368b

View File

@ -750,7 +750,7 @@ pub fn format_impl(
result.push_str(&outer_indent_str);
}
if result.ends_with('{') {
if result.ends_with('{') && !context.config.empty_item_single_line() {
result.push_str(&sep);
}
result.push('}');