mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
cd0b50f0a5
Summary: Migrate the code from accessing optional Thrift fields directly to a safer `optional_field_ref` API. See https://fburl.com/safe for more details. The output of this codemod has been reviewed in D13259011. To preserve semantics, each unchecked access is replaced with an explicit call to `value_unchecked()`. If you are sure that accessing a field is safe (the field is marked as set), you can later replace `value_unchecked()` with `value()` or dereferencing (`operator *`): ``` ThriftStruct s = ... - auto foo = s.foo_ref().value_unchecked(); + auto foo = *s.foo_ref(); // will throw if s.foo is unset ``` Reviewed By: chadaustin Differential Revision: D13684410 fbshipit-source-id: 919de4ddf89e7f0463f2614baba4bfbac1c8255c |
||
---|---|---|
.. | ||
oss | ||
test | ||
__init__.py | ||
client.py | ||
CMakeLists.txt | ||
eden.thrift | ||
EdenCPUThreadPool.cpp | ||
EdenCPUThreadPool.h | ||
EdenError.cpp | ||
EdenError.h | ||
EdenServer.cpp | ||
EdenServer.h | ||
EdenServiceHandler.cpp | ||
EdenServiceHandler.h | ||
fb-edenfs@.service | ||
main.cpp | ||
PrettyPrinters.cpp | ||
PrettyPrinters.h | ||
StartupLogger.cpp | ||
StartupLogger.h | ||
streamingeden.thrift | ||
StreamingSubscriber.cpp | ||
StreamingSubscriber.h | ||
Systemd.cpp | ||
Systemd.h | ||
ThriftUtil.h |