summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/build.rs4
-rw-r--r--cli/lsp/tsc.rs2
-rw-r--r--cli/tests/unit/metrics_test.ts8
-rw-r--r--cli/tsc.rs2
4 files changed, 7 insertions, 9 deletions
diff --git a/cli/build.rs b/cli/build.rs
index d4e6a92ab..eb8a71c8c 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -156,7 +156,7 @@ fn create_compiler_snapshot(
});
js_runtime.register_op(
"op_build_info",
- op_sync(move |_state, _args: Value, _bufs| {
+ op_sync(move |_state, _args: Value, _: ()| {
Ok(json!({
"buildSpecifier": build_specifier,
"libs": build_libs,
@@ -167,7 +167,7 @@ fn create_compiler_snapshot(
// files, but a slightly different implementation at build time.
js_runtime.register_op(
"op_load",
- op_sync(move |_state, args, _bufs| {
+ op_sync(move |_state, args, _: ()| {
let v: LoadArgs = serde_json::from_value(args)?;
// we need a basic file to send to tsc to warm it up.
if v.specifier == build_specifier {
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index a7f80e3f9..869a61838 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -1826,7 +1826,7 @@ where
V: de::DeserializeOwned,
R: Serialize + 'static,
{
- op_sync(move |s, args, _bufs| {
+ op_sync(move |s, args, _: ()| {
let state = s.borrow_mut::<State>();
op_fn(state, args)
})
diff --git a/cli/tests/unit/metrics_test.ts b/cli/tests/unit/metrics_test.ts
index a1936cb1d..f041cf1c9 100644
--- a/cli/tests/unit/metrics_test.ts
+++ b/cli/tests/unit/metrics_test.ts
@@ -14,7 +14,7 @@ unitTest(async function metrics(): Promise<void> {
assert(m1.opsDispatched > 0);
assert(m1.opsCompleted > 0);
assert(m1.bytesSentControl === 0);
- assert(m1.bytesSentData >= 0);
+ assert(m1.bytesSentData === 0);
assert(m1.bytesReceived === 0);
const m1OpWrite = m1.ops["op_write_async"];
assert(m1OpWrite.opsDispatchedAsync > 0);
@@ -29,15 +29,13 @@ unitTest(async function metrics(): Promise<void> {
assert(m2.opsDispatchedAsync > m1.opsDispatchedAsync);
assert(m2.opsCompletedAsync > m1.opsCompletedAsync);
assert(m2.bytesSentControl === m1.bytesSentControl);
- assert(m2.bytesSentData >= m1.bytesSentData + dataMsg.byteLength);
+ assert(m2.bytesSentData === 0);
assert(m2.bytesReceived === m1.bytesReceived);
const m2OpWrite = m2.ops["op_write_async"];
assert(m2OpWrite.opsDispatchedAsync > m1OpWrite.opsDispatchedAsync);
assert(m2OpWrite.opsCompletedAsync > m1OpWrite.opsCompletedAsync);
assert(m2OpWrite.bytesSentControl === m1OpWrite.bytesSentControl);
- assert(
- m2OpWrite.bytesSentData >= m1OpWrite.bytesSentData + dataMsg.byteLength,
- );
+ assert(m2OpWrite.bytesSentData === 0);
assert(m2OpWrite.bytesReceived === m1OpWrite.bytesReceived);
});
diff --git a/cli/tsc.rs b/cli/tsc.rs
index 5c43f0231..e2fc80676 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -227,7 +227,7 @@ fn op<F>(op_fn: F) -> Box<OpFn>
where
F: Fn(&mut State, Value) -> Result<Value, AnyError> + 'static,
{
- op_sync(move |s, args, _bufs| {
+ op_sync(move |s, args, _: ()| {
let state = s.borrow_mut::<State>();
op_fn(state, args)
})