From 1955b623f57eff28a2412656371246cd97320ab6 Mon Sep 17 00:00:00 2001 From: TJ Yin Date: Sun, 24 Nov 2024 15:41:17 -0800 Subject: [PATCH] Codemod MapPatch::add to tryPutMulti Reviewed By: thedavekwon Differential Revision: D66384055 fbshipit-source-id: c2a2f62bb639b853f68da0e0010ee68f9f9e659a --- .../thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h b/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h index 15d6cdfbc29b4..1dbe8e07ec974 100644 --- a/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h +++ b/third-party/thrift/src/thrift/lib/cpp2/op/detail/ContainerPatch.h @@ -355,7 +355,7 @@ class MapPatch : public BaseContainerPatch> { /// Ensures that key exists and patches the entry. template FOLLY_NODISCARD VP& ensureAndPatchByKey(K&& key) { - add({{key, {}}}); + tryPutMulti({{key, {}}}); return patchByKey(key); }