| commit | 3577d451d7877ee00e765c2f93fd7e563ee45499 | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Tue Mar 17 21:48:13 2020 -0700 |
| committer | David Tolnay <dtolnay@gmail.com> | Tue Mar 17 21:48:13 2020 -0700 |
| tree | 6286f78354bbcf7ff5736731de6e9c2f904b31c2 | |
| parent | b7a7cb6785b63188c411a74db3f1eb05dce240b9 [diff] [blame] |
Fix blank first line if no headers emitted
diff --git a/gen/include.rs b/gen/include.rs index a7657e4..b19a097 100644 --- a/gen/include.rs +++ b/gen/include.rs
@@ -26,7 +26,7 @@ } } -#[derive(Default)] +#[derive(Default, PartialEq)] pub struct Includes { custom: Vec<String>, pub array: bool, @@ -74,6 +74,9 @@ if self.type_traits { writeln!(f, "#include <type_traits>")?; } + if *self != Self::default() { + writeln!(f)?; + } Ok(()) } }