Skip to content

Commit

Permalink
fix: fix use of designated initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkSharpness committed Feb 25, 2025
1 parent 3911674 commit 3d6fc8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/cpp/test_thread_safe_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ using namespace std::chrono_literals;
TEST(XGrammarParallelTest, CacheEfficiency) {
auto cache = ThreadSafeCache<std::string, MockGrammar>{[](const std::string&) {
std::this_thread::sleep_for(1s); // simulate a slow operation
return MockGrammar{.uuid = counter++, .padding = {}};
MockGrammar g{};
g.uuid = counter++;
return g;
}};
auto futures = std::vector<std::future<std::size_t>>{};

Expand Down

0 comments on commit 3d6fc8c

Please sign in to comment.