From: Seiichi Uchida Date: Wed, 6 Jun 2018 01:55:25 +0000 (+0900) Subject: Respect empty_item_single_line config option when formatting empty impls X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;ds=sidebyside;h=a4db62368bb3c1049981e5565bc6e7ba75910248;p=rust.git Respect empty_item_single_line config option when formatting empty impls --- diff --git a/src/items.rs b/src/items.rs index a45d41842de..38311abcba0 100644 --- a/src/items.rs +++ b/src/items.rs @@ -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('}');