Timothy Flynn
604d5f5bca
AK+Everywhere: Do not implicitly copy variables in TRY macros
...
For example, consider cases where we want to propagate errors only in
specific instances:
auto result = read_data(); // something like ErrorOr<ByteBuffer>
if (result.is_error() && result.error().code() != EINTR)
continue;
auto bytes = TRY(result);
The TRY invocation will currently copy the byte buffer when the
expression (in this case, just a local variable) is stored into
_temporary_result.
This patch binds the expression to a reference to prevent such copies.
In less trival invocations (such as TRY(some_function()), this will
incur only temporary lifetime extensions, i.e. no functional change.
2023-02-10 09:08:52 +00:00
..
2023-02-09 17:13:33 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-08 19:15:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-15 01:00:20 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-28 00:41:18 +00:00
2023-02-10 09:08:52 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-02-08 19:15:45 +00:00
2023-02-08 19:15:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-23 09:56:50 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-28 00:41:18 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-23 09:56:50 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-23 09:56:50 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-02-10 09:08:52 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-15 01:00:20 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-23 09:56:50 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-22 01:03:13 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-16 10:12:37 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-23 09:56:50 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-02-09 17:13:33 +00:00
2023-01-29 00:02:45 +00:00
2023-01-15 01:00:20 +00:00
2023-01-15 01:00:20 +00:00
2023-01-29 00:02:45 +00:00
2023-02-08 19:15:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-15 01:00:20 +00:00
2023-01-15 01:00:20 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-22 01:03:13 +00:00
2023-01-15 01:00:20 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00
2023-01-29 00:02:45 +00:00