diff --git a/eden/mononoke/mercurial/types/src/blobs/manifest.rs b/eden/mononoke/mercurial/types/src/blobs/manifest.rs index 60ae924298..bde4780d3e 100644 --- a/eden/mononoke/mercurial/types/src/blobs/manifest.rs +++ b/eden/mononoke/mercurial/types/src/blobs/manifest.rs @@ -78,9 +78,9 @@ impl ManifestContent { } } -pub fn fetch_raw_manifest_bytes( +pub fn fetch_raw_manifest_bytes( ctx: CoreContext, - blobstore: &Arc, + blobstore: &B, manifest_id: HgManifestId, ) -> BoxFuture { fetch_manifest_envelope(ctx, blobstore, manifest_id) @@ -92,9 +92,9 @@ pub fn fetch_raw_manifest_bytes( .boxify() } -pub fn fetch_manifest_envelope( +pub fn fetch_manifest_envelope( ctx: CoreContext, - blobstore: &Arc, + blobstore: &B, manifest_id: HgManifestId, ) -> impl Future { fetch_manifest_envelope_opt(ctx, blobstore, manifest_id) @@ -109,9 +109,9 @@ pub fn fetch_manifest_envelope( } /// Like `fetch_manifest_envelope`, but returns None if the manifest wasn't found. -pub fn fetch_manifest_envelope_opt( +pub fn fetch_manifest_envelope_opt( ctx: CoreContext, - blobstore: &Arc, + blobstore: &B, node_id: HgManifestId, ) -> impl Future, Error = Error> { let blobstore_key = node_id.blobstore_key(); diff --git a/eden/mononoke/mononoke_api/src/hg/tree.rs b/eden/mononoke/mononoke_api/src/hg/tree.rs index 433e69ac6d..11ab1dd438 100644 --- a/eden/mononoke/mononoke_api/src/hg/tree.rs +++ b/eden/mononoke/mononoke_api/src/hg/tree.rs @@ -5,9 +5,6 @@ * GNU General Public License version 2. */ -use std::sync::Arc; - -use blobstore::Blobstore; use bytes::Bytes; use futures::compat::Future01CompatExt; use mercurial_types::{ @@ -35,8 +32,8 @@ impl HgTreeContext { manifest_id: HgManifestId, ) -> Result { let ctx = repo.ctx().clone(); - let blobstore: Arc = Arc::new(repo.blob_repo().blobstore().clone()); - let envelope = fetch_manifest_envelope(ctx, &blobstore, manifest_id) + let blobstore = repo.blob_repo().blobstore(); + let envelope = fetch_manifest_envelope(ctx, blobstore, manifest_id) .compat() .await?; Ok(Self { repo, envelope }) @@ -47,8 +44,8 @@ impl HgTreeContext { manifest_id: HgManifestId, ) -> Result, MononokeError> { let ctx = repo.ctx().clone(); - let blobstore: Arc = Arc::new(repo.blob_repo().blobstore().clone()); - let envelope = fetch_manifest_envelope_opt(ctx, &blobstore, manifest_id) + let blobstore = repo.blob_repo().blobstore(); + let envelope = fetch_manifest_envelope_opt(ctx, blobstore, manifest_id) .compat() .await?; Ok(envelope.map(move |envelope| Self { repo, envelope }))