Skip to content

Commit 23c24d7

Browse files
YuhanunCitgezDarrylGamroth
authored andcommitted
Rust Generation: Avoid warnings (aeron-io#995)
1 parent e51e3bd commit 23c24d7

File tree

1 file changed

+1
-5
lines changed
  • sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ void generate() throws IOException
6161
indent(libRs, 0, "#![forbid(unsafe_code)]\n");
6262
indent(libRs, 0, "#![allow(clippy::upper_case_acronyms)]\n");
6363
indent(libRs, 0, "#![allow(non_camel_case_types)]\n\n");
64+
indent(libRs, 0, "#![allow(ambiguous_glob_reexports)]\n\n");
6465
indent(libRs, 0, "use ::core::{convert::TryInto};\n\n");
6566

6667
final ArrayList<String> modules = new ArrayList<>();
@@ -171,11 +172,6 @@ static void generateReadBuf(final Appendable writer, final ByteOrder byteOrder)
171172
indent(writer, 2, "Self { data }\n");
172173
indent(writer, 1, "}\n\n");
173174

174-
indent(writer, 1, "#[inline]\n");
175-
indent(writer, 1, "fn get_bytes<const COUNT: usize>(slice: &[u8]) -> [u8; COUNT] {\n");
176-
indent(writer, 2, "slice.try_into().expect(\"slice with incorrect length\")\n");
177-
indent(writer, 1, "}\n\n");
178-
179175
indent(writer, 1, "#[inline]\n");
180176
indent(writer, 1, "pub(crate) fn get_bytes_at<const N: usize>(slice: &[u8], index: usize) -> [u8; N] {\n");
181177
indent(writer, 2, "slice[index..index+N].try_into().expect(\"slice with incorrect length\")\n");

0 commit comments

Comments
 (0)