Skip to content

Commit

Permalink
Codemod MapPatch::add to tryPutMulti
Browse files Browse the repository at this point in the history
Reviewed By: thedavekwon

Differential Revision: D66384055

fbshipit-source-id: c2a2f62bb639b853f68da0e0010ee68f9f9e659a
  • Loading branch information
TJ Yin authored and facebook-github-bot committed Nov 24, 2024
1 parent 27d24e7 commit 1955b62
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class MapPatch : public BaseContainerPatch<Patch, MapPatch<Patch>> {
/// Ensures that key exists and patches the entry.
template <typename K = typename T::key_type>
FOLLY_NODISCARD VP& ensureAndPatchByKey(K&& key) {
add({{key, {}}});
tryPutMulti({{key, {}}});
return patchByKey(key);
}

Expand Down

0 comments on commit 1955b62

Please sign in to comment.