diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-11-13 23:14:48 -0500 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-11-13 23:42:35 -0500 |
commit | fdf0ede2acd110ba04857d5674db19c908b3ff32 (patch) | |
tree | 880252cadf6dd5024fe4d32dca7ab903af55e713 /cli/ops/dispatch_minimal.rs | |
parent | fd62379eafde6571f126df5650b80cfda9f74229 (diff) |
Revert "refactor: per-worker resource table (#3306)"
This patch does not work with the recent bundler changes (#3325).
Unfortunately I didn't merge master before landing this patch. It has
something to do with console.log not working inside the compiler worker.
This reverts commit fd62379eafde6571f126df5650b80cfda9f74229.
Diffstat (limited to 'cli/ops/dispatch_minimal.rs')
-rw-r--r-- | cli/ops/dispatch_minimal.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/ops/dispatch_minimal.rs b/cli/ops/dispatch_minimal.rs index 355a24634..c19521bf1 100644 --- a/cli/ops/dispatch_minimal.rs +++ b/cli/ops/dispatch_minimal.rs @@ -15,6 +15,7 @@ use deno::PinnedBuf; use futures::Future; pub type MinimalOp = dyn Future<Item = i32, Error = ErrBox> + Send; +pub type Dispatcher = fn(i32, Option<PinnedBuf>) -> Box<MinimalOp>; #[derive(Copy, Clone, Debug, PartialEq)] // This corresponds to RecordMinimal on the TS side. @@ -111,10 +112,9 @@ fn test_parse_min_record() { assert_eq!(parse_min_record(&buf), None); } -pub fn minimal_op<D>(d: D) -> impl Fn(&[u8], Option<PinnedBuf>) -> CoreOp -where - D: Fn(i32, Option<PinnedBuf>) -> Box<MinimalOp>, -{ +pub fn minimal_op( + d: Dispatcher, +) -> impl Fn(&[u8], Option<PinnedBuf>) -> CoreOp { move |control: &[u8], zero_copy: Option<PinnedBuf>| { let mut record = match parse_min_record(control) { Some(r) => r, |