diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-08-28 17:08:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 17:08:24 +0200 |
commit | 7e946858a4a0a03c1461590c6fc8a315738a627a (patch) | |
tree | 5a6a391fead573b85fb905bb5c4ea8287dc18d13 /cli/ops/dispatch_json.rs | |
parent | 31f32ed8c4082d36ad2a4ea460366c0d57a5ddbc (diff) |
refactor: migrate ops to new dispatch wrapper (#7118)
Diffstat (limited to 'cli/ops/dispatch_json.rs')
-rw-r--r-- | cli/ops/dispatch_json.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/cli/ops/dispatch_json.rs b/cli/ops/dispatch_json.rs index 031e10c51..e28c32382 100644 --- a/cli/ops/dispatch_json.rs +++ b/cli/ops/dispatch_json.rs @@ -119,15 +119,3 @@ where } } } - -pub fn blocking_json<F>(is_sync: bool, f: F) -> Result<JsonOp, ErrBox> -where - F: 'static + Send + FnOnce() -> JsonResult, -{ - if is_sync { - Ok(JsonOp::Sync(f()?)) - } else { - let fut = async move { tokio::task::spawn_blocking(f).await.unwrap() }; - Ok(JsonOp::Async(fut.boxed_local())) - } -} |