From 2c3b32585e93346f8cfced012f4c44e6b00f664e Mon Sep 17 00:00:00 2001 From: RenzoMXD <170978465+RenzoMXD@users.noreply.github.com> Date: Wed, 11 Mar 2026 17:33:45 +0100 Subject: [PATCH 1/3] Fix: allow flexbuffers alloc check test --- tests/rust_usage_test/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rust_usage_test/Cargo.toml b/tests/rust_usage_test/Cargo.toml index 828224dd9a..cd2064e162 100644 --- a/tests/rust_usage_test/Cargo.toml +++ b/tests/rust_usage_test/Cargo.toml @@ -25,12 +25,12 @@ path = "bin/monster_example.rs" [[bin]] name = "flatbuffers_alloc_check" path = "bin/flatbuffers_alloc_check.rs" -test = false +test = true [[bin]] name = "flexbuffers_alloc_check" path = "bin/flexbuffers_alloc_check.rs" -test = false +test = true [[bin]] name = "sample_flexbuffers" From 234768048c4afce0380ab83835367e4c95a938b1 Mon Sep 17 00:00:00 2001 From: RenzoMXD <170978465+RenzoMXD@users.noreply.github.com> Date: Thu, 12 Mar 2026 05:23:59 +0100 Subject: [PATCH 2/3] fix: flaky CI failure --- rust/flatbuffers/src/builder.rs | 3 +++ tests/rust_usage_test/Cargo.toml | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/flatbuffers/src/builder.rs b/rust/flatbuffers/src/builder.rs index f4cf961e3e..7edacc58ee 100644 --- a/rust/flatbuffers/src/builder.rs +++ b/rust/flatbuffers/src/builder.rs @@ -294,6 +294,9 @@ impl<'fbb, A: Allocator> FlatBufferBuilder<'fbb, A> { min_align: 0, force_defaults: false, + #[cfg(feature = "std")] + strings_pool: HashMap::with_capacity(strings_pool_capacity), + #[cfg(not(feature = "std"))] strings_pool: Vec::with_capacity(strings_pool_capacity), _phantom: PhantomData, diff --git a/tests/rust_usage_test/Cargo.toml b/tests/rust_usage_test/Cargo.toml index cd2064e162..5b7152b9c5 100644 --- a/tests/rust_usage_test/Cargo.toml +++ b/tests/rust_usage_test/Cargo.toml @@ -25,12 +25,10 @@ path = "bin/monster_example.rs" [[bin]] name = "flatbuffers_alloc_check" path = "bin/flatbuffers_alloc_check.rs" -test = true [[bin]] name = "flexbuffers_alloc_check" path = "bin/flexbuffers_alloc_check.rs" -test = true [[bin]] name = "sample_flexbuffers" From 1ccfffd9d69ef38d1f32614f2ee18ef8d364abba Mon Sep 17 00:00:00 2001 From: RenzoMXD <170978465+RenzoMXD@users.noreply.github.com> Date: Thu, 12 Mar 2026 13:25:57 +0100 Subject: [PATCH 3/3] fix: set flexbuffers alloc check false --- tests/rust_usage_test/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/rust_usage_test/Cargo.toml b/tests/rust_usage_test/Cargo.toml index 5b7152b9c5..828224dd9a 100644 --- a/tests/rust_usage_test/Cargo.toml +++ b/tests/rust_usage_test/Cargo.toml @@ -25,10 +25,12 @@ path = "bin/monster_example.rs" [[bin]] name = "flatbuffers_alloc_check" path = "bin/flatbuffers_alloc_check.rs" +test = false [[bin]] name = "flexbuffers_alloc_check" path = "bin/flexbuffers_alloc_check.rs" +test = false [[bin]] name = "sample_flexbuffers"