mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
edenapi: avoid EdenApiBlocking in C bindings
Summary: Unblocks removing `EdenApiBlocking`. Reviewed By: yancouto Differential Revision: D31416612 fbshipit-source-id: c2aa1add69c24ba247c4bdcfcacaeaceb15ac0d6
This commit is contained in:
parent
c22c44397e
commit
cbb7df0fc1
@ -12,7 +12,7 @@ use anyhow::Error;
|
|||||||
use libc::size_t;
|
use libc::size_t;
|
||||||
|
|
||||||
use edenapi::EdenApi;
|
use edenapi::EdenApi;
|
||||||
use edenapi::{Builder, EdenApiBlocking};
|
use edenapi::{BlockingResponse, Builder};
|
||||||
use edenapi_types::{EdenApiServerError, TreeEntry};
|
use edenapi_types::{EdenApiServerError, TreeEntry};
|
||||||
use types::Key as ApiKey;
|
use types::Key as ApiKey;
|
||||||
|
|
||||||
@ -58,9 +58,10 @@ fn edenapi_trees_blocking(
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|k| k.try_into())
|
.map(|k| k.try_into())
|
||||||
.collect::<Result<Vec<ApiKey>, _>>()?;
|
.collect::<Result<Vec<ApiKey>, _>>()?;
|
||||||
Ok(client
|
Ok(
|
||||||
.trees_blocking(repo, keys, Some(attrs.into()))
|
BlockingResponse::from_async(client.trees(repo, keys, Some(attrs.into())))
|
||||||
.map(|f| f.entries)?)
|
.map(|f| f.entries)?,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
Loading…
Reference in New Issue
Block a user