From 874f959a756818edd0982548ebd3d92c3bf0bca3 Mon Sep 17 00:00:00 2001 From: Adam Leventhal Date: Sun, 3 Oct 2021 20:31:53 -0700 Subject: [PATCH] Add a newline between items (#5) --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 01da9fa..e7197ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -824,7 +824,10 @@ fn generate(api: &OpenAPI, ts: &mut TypeSpace) -> Result { #(#methods)* } }; - let file = rustfmt_wrapper::rustfmt(file).unwrap(); + let file = rustfmt_wrapper::rustfmt(file) + .unwrap() + // Format any indented item. + .replace(" }\n", " }\n\n"); Ok(file) }