Skip to content

Commit 31d95af

Browse files
authored
Merge pull request #676 from dm3/rust-fix-warnings
[Rust] Fix warnings in the generated codec
2 parents c723b63 + 2139ea1 commit 31d95af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/RustGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private static void generateSingleBitSet(final List<Token> tokens, final OutputM
197197
final String setType = formatTypeName(beginToken.applicableTypeName());
198198
try (Writer writer = outputManager.createOutput(setType + " bit set"))
199199
{
200-
writer.append("#[derive(Debug,Default)]\n");
200+
writer.append("#[derive(Default)]\n");
201201
writer.append("#[repr(C,packed)]\n");
202202
final String rustPrimitiveType = rustTypeName(beginToken.encoding().primitiveType());
203203
writer.append(format("pub struct %s(pub %s);\n", setType, rustPrimitiveType));
@@ -648,7 +648,7 @@ private static void writeGroupDecoderTopTypes(
648648
indent(out).append("}\n");
649649

650650
indent(out).append("#[inline]\n");
651-
indent(out, 1, "fn after_member(mut self) -> %s {\n", groupLevelNextDecoderType);
651+
indent(out, 1, "fn after_member(self) -> %s {\n", groupLevelNextDecoderType);
652652
indent(out, 2).append("if self.index <= self.max_index {\n");
653653
indent(out, 3).append("Either::Left(self)\n");
654654
indent(out, 2).append("} else {\n").append(INDENT).append(INDENT).append(INDENT)

0 commit comments

Comments
 (0)