mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
e4575f33be
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 ``` drop-conflicts Reviewed By: stevegury Differential Revision: D15786632 fbshipit-source-id: 7c3f089dfa79597b189da6996cb76dcdbd5ed612 |
||
---|---|---|
.. | ||
git | ||
hg | ||
mononoke | ||
test | ||
BackingStore.h | ||
BlobAccess.cpp | ||
BlobAccess.h | ||
BlobCache.cpp | ||
BlobCache.h | ||
BlobMetadata.h | ||
CMakeLists.txt | ||
Diff.cpp | ||
Diff.h | ||
eden_store_util.cpp | ||
EmptyBackingStore.cpp | ||
EmptyBackingStore.h | ||
IObjectStore.h | ||
KeySpaces.h | ||
LocalStore.cpp | ||
LocalStore.h | ||
MemoryLocalStore.cpp | ||
MemoryLocalStore.h | ||
ObjectStore.cpp | ||
ObjectStore.h | ||
RocksDbLocalStore.cpp | ||
RocksDbLocalStore.h | ||
SerializedBlobMetadata.cpp | ||
SerializedBlobMetadata.h | ||
SqliteLocalStore.cpp | ||
SqliteLocalStore.h | ||
StoreResult.cpp | ||
StoreResult.h |