summaryrefslogtreecommitdiff
path: root/cli/ops/dispatch_minimal.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-08-22 22:30:14 -0700
committerGitHub <noreply@github.com>2019-08-22 22:30:14 -0700
commitbc467b265fbe06ace24f5d9536bd8eb36ae4a601 (patch)
tree6c1761c852398a63fe31fc912841b449fe3851c3 /cli/ops/dispatch_minimal.rs
parent47c216317f8eb5bf277663a732a79f6b07ba79ef (diff)
introduce JSON serialization for ops (#2799)
Converts env(), exit(), execPath(), utime() and utimeSync() to use JSON instead of flatbuffers.
Diffstat (limited to 'cli/ops/dispatch_minimal.rs')
-rw-r--r--cli/ops/dispatch_minimal.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/cli/ops/dispatch_minimal.rs b/cli/ops/dispatch_minimal.rs
index 37ad56813..22d0a92f8 100644
--- a/cli/ops/dispatch_minimal.rs
+++ b/cli/ops/dispatch_minimal.rs
@@ -74,19 +74,15 @@ fn test_parse_min_record() {
pub fn dispatch(
d: Dispatcher,
- state: &ThreadSafeState,
+ _state: &ThreadSafeState,
control: &[u8],
zero_copy: Option<PinnedBuf>,
) -> CoreOp {
let mut record = parse_min_record(control).unwrap();
let is_sync = record.promise_id == 0;
-
// TODO(ry) Currently there aren't any sync minimal ops. This is just a sanity
// check. Remove later.
assert!(!is_sync);
-
- let state = state.clone();
-
let rid = record.arg;
let min_op = d(rid, zero_copy);
@@ -102,10 +98,9 @@ pub fn dispatch(
record.result = -1;
}
}
- let buf: Buf = record.into();
- state.metrics_op_completed(buf.len());
- Ok(buf)
+ Ok(record.into())
}));
+
if is_sync {
Op::Sync(fut.wait().unwrap())
} else {