summaryrefslogtreecommitdiff
path: root/cli/ops/dispatch_json.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-08-28 17:08:24 +0200
committerGitHub <noreply@github.com>2020-08-28 17:08:24 +0200
commit7e946858a4a0a03c1461590c6fc8a315738a627a (patch)
tree5a6a391fead573b85fb905bb5c4ea8287dc18d13 /cli/ops/dispatch_json.rs
parent31f32ed8c4082d36ad2a4ea460366c0d57a5ddbc (diff)
refactor: migrate ops to new dispatch wrapper (#7118)
Diffstat (limited to 'cli/ops/dispatch_json.rs')
-rw-r--r--cli/ops/dispatch_json.rs12
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()))
- }
-}