From d777b89c179279be36f7f84608794b61aadc57aa Mon Sep 17 00:00:00 2001 From: Chad Seldomridge Date: Tue, 8 Apr 2025 09:11:09 -0600 Subject: [PATCH] Moved location of newline character generation so that the file contents diff check inside write_codable_file will work as expected. --- core/src/language/swift.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/language/swift.rs b/core/src/language/swift.rs index da49ba0e..d5017674 100644 --- a/core/src/language/swift.rs +++ b/core/src/language/swift.rs @@ -790,12 +790,12 @@ impl Swift { decs.push(CODABLE); } - format!("\n/// () isn't codable, so we use this instead to represent Rust's unit type\npublic struct CodableVoid: {} {{}}", decs.join(", ")) + format!("\n/// () isn't codable, so we use this instead to represent Rust's unit type\npublic struct CodableVoid: {} {{}}\n", decs.join(", ")) } /// Write the `CodableVoid` type. fn write_codable(&self, w: &mut dyn Write, output_string: &str) -> io::Result<()> { - writeln!(w, "{}", output_string) + write!(w, "{}", output_string) } /// Build the generic constraints output. This checks for the `swiftGenericConstraints` typeshare attribute and combines