]> git.lizzy.rs Git - rust.git/commitdiff
Respect empty_item_single_line config option when formatting empty impls
authorSeiichi Uchida <seiichi.uchida@dena.com>
Wed, 6 Jun 2018 01:55:25 +0000 (10:55 +0900)
committerSeiichi Uchida <seiichi.uchida@dena.com>
Wed, 6 Jun 2018 01:55:25 +0000 (10:55 +0900)
src/items.rs

index a45d41842dec04fe1f40aefef7d6a9f2d81754cd..38311abcba0ce68e6cf9b487842a3eb784bab38f 100644 (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('}');