Page MenuHomePhabricator

Disable util::Result copying and assignment
ClosedPublic

Authored by Fabien on Tue, Apr 22, 21:46.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCda3ee832f65b: Disable util::Result copying and assignment
Summary
It disables copying of util::Result objects because unnecessary copies are inefficient and not possible after #25665, which makes util::Result object move-only.

It disables the assignment operator and replaces it with an Update() method, because #25665 adds more information to util::Result objects (warning and error messages and failure values) and having an assignment operator that overwrites data instead of merging it would make it easy to accidentally erase existing information while trying to assign new information.

Backport of core#29906.

Test Plan
ninja all check-all