diff options
author | Ava Chow <github@achow101.com> | 2024-04-30 12:13:43 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-04-30 12:19:03 -0400 |
commit | 2d3056751bb7d742a802a30503f07dbeb07310ee (patch) | |
tree | 2ff5ea576c0925d0d7816f68eeaa00418a438183 /src/rpc/net.cpp | |
parent | 15f696b454047f5dafc3c95e36fcd677c1901de9 (diff) | |
parent | 6a8b2befeab25e4e92d8e947a23e78014695e06c (diff) |
Merge bitcoin/bitcoin#29906: Disable util::Result copying and assignment
6a8b2befeab25e4e92d8e947a23e78014695e06c refactor: Avoid copying util::Result values (Ryan Ofsky)
834f65e82405bbed336f98996bc8cef366bbed0f refactor: Drop util::Result operator= (Ryan Ofsky)
Pull request description:
This PR just contains the first two commits of #25665.
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.
ACKs for top commit:
stickies-v:
re-ACK 6a8b2befeab25e4e92d8e947a23e78014695e06c
achow101:
ACK 6a8b2befeab25e4e92d8e947a23e78014695e06c
furszy:
re-ACK https://github.com/bitcoin/bitcoin/commit/6a8b2befeab25e4e92d8e947a23e78014695e06c
Tree-SHA512: 3f21af9031d50d6c68cca69133de03080f69b1ddcf8b140bdeb762069f14645209b2586037236d15b6ebd8973af0fbefd7e83144aeb7b84078a4cb4df812f984
Diffstat (limited to 'src/rpc/net.cpp')
0 files changed, 0 insertions, 0 deletions