mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 22:37:37 +03:00
1b36d4bf83
Summary: Add a new StoreResult which wraps the std::string returned by RocksDB. This replaces the std::unique<string> that LocalStore::get() used to return. This lets us avoid a memory allocation. StoreResult can also represent a "not found" result, so that this case can be processed efficiently without having to throw an exception. Additionally, StoreResult is move-only so we can't ever unintentionally copy the string data, which is potentially expensive. It also provides APIs for creating IOBuf wrappers, or moving the string to the heap so we can create an managed IOBuf around it. Reviewed By: bolinfest Differential Revision: D3403958 fbshipit-source-id: ab0c304988a53eda50341ecc2f96ae5235e5260c |
||
---|---|---|
.. | ||
fs | ||
fuse | ||
utils | ||
DEFS |