From 3063dd5f36dc6181bde006aee2623c45cae1e7e5 Mon Sep 17 00:00:00 2001 From: Michael Ward Date: Mon, 23 Dec 2024 09:32:57 -0600 Subject: [PATCH] fixed formatting issues --- .../sbe/generation/rust/RustGenerator.java | 18 +++++++++--------- .../sbe/generation/rust/RustUtilTest.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/RustGenerator.java b/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/RustGenerator.java index 87d217286..0efc5f97f 100644 --- a/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/RustGenerator.java +++ b/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/RustGenerator.java @@ -384,10 +384,10 @@ private static void generateRustDoc( } private static void generatePrimitiveArrayFromIterEncoder( - final StringBuilder sb, - final int level, - final Token typeToken, - final String name) throws IOException + final StringBuilder sb, + final int level, + final Token typeToken, + final String name) throws IOException { final Encoding encoding = typeToken.encoding(); final PrimitiveType primitiveType = encoding.primitiveType(); @@ -397,7 +397,7 @@ private static void generatePrimitiveArrayFromIterEncoder( generateRustDoc(sb, level, typeToken, encoding); indent(sb, level, "#[inline]\n"); indent(sb, level, "pub fn %s_from_iter(&mut self, iter: impl Iterator) {\n", - formatFunctionName(name), rustPrimitiveType); + formatFunctionName(name), rustPrimitiveType); indent(sb, level + 1, "let offset = self.%s;\n", getBufOffset(typeToken)); indent(sb, level + 1, "let buf = self.get_buf_mut();\n"); @@ -417,10 +417,10 @@ private static void generatePrimitiveArrayFromIterEncoder( } private static void generatePrimitiveArrayZeroPaddedEncoder( - final StringBuilder sb, - final int level, - final Token typeToken, - final String name) throws IOException + final StringBuilder sb, + final int level, + final Token typeToken, + final String name) throws IOException { final Encoding encoding = typeToken.encoding(); final PrimitiveType primitiveType = encoding.primitiveType(); diff --git a/sbe-tool/src/test/java/uk/co/real_logic/sbe/generation/rust/RustUtilTest.java b/sbe-tool/src/test/java/uk/co/real_logic/sbe/generation/rust/RustUtilTest.java index 34fa845fa..6092fb5d4 100644 --- a/sbe-tool/src/test/java/uk/co/real_logic/sbe/generation/rust/RustUtilTest.java +++ b/sbe-tool/src/test/java/uk/co/real_logic/sbe/generation/rust/RustUtilTest.java @@ -101,7 +101,7 @@ void generateRustLiteralNullPrimitiveTypeParam() @Test void generateRustLiteralNullValueParam() { - assertThrows(NullPointerException.class, () -> generateRustLiteral(INT8, (String) null)); + assertThrows(NullPointerException.class, () -> generateRustLiteral(INT8, (String)null)); } @Test