mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
f5d4e0b5f7
Summary: Currently, we take a `&mut (dyn Buf + Send)` as input when writng to Manifold. This has a couple of downsides: - It's not very ergonomic. From the API it's not obvious what mutations are going to be done on your `Buf` exactly (it's going to be consumed entirely), and it often results in code that's a little clumsy (see what I had to change here), where make calls like `write(&key, &mut mydata.clone())`. - It limits what we can do with it. If you already have a `IOBufShared` on hand, you shouldn't need to copy it in order to pass it to Manifold, but currently the Manifold client code does have to copy it because all it sees is a `dyn Buf`. This diff updates the client to take a `IOBufShared` directly, which has plenty of convenient `From<...>` conversions (and some efficient ones like `From<Bytes>`, which doesn't copy the `Bytes` at all). Reviewed By: ahornby, Imxset21 Differential Revision: D28535539 fbshipit-source-id: bba1b963a96350ad57cc0fbfcc31f7e1eb36c317 |
||
---|---|---|
.. | ||
admin | ||
backfill_derived_data | ||
benchmark_storage_config | ||
blobstore_healer | ||
bonsai_verify | ||
copy_blobstore_keys | ||
manual_scrub | ||
packer | ||
sqlblob_gc | ||
streaming_clone_warmup | ||
aliasverify.rs | ||
backfill_mapping.rs | ||
benchmark_filestore.rs | ||
blobimport.rs | ||
configlint.rs | ||
dumprev.rs | ||
idxdump.rs | ||
lfs_import.rs | ||
populate_healer.rs | ||
rechunker.rs | ||
revlogrepo.rs | ||
segmented_changelog_seeder.rs | ||
segmented_changelog_tailer.rs | ||
statistics_collector.rs | ||
upload_globalrevs.rs |