summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/build.rs4
-rw-r--r--cli/ops/errors.rs10
2 files changed, 4 insertions, 10 deletions
diff --git a/cli/build.rs b/cli/build.rs
index d118dd5b9..98dea9b46 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -202,12 +202,12 @@ fn create_compiler_snapshot(
}
#[op]
- fn op_cwd(_state: &mut OpState, _args: Value) -> Result<Value, AnyError> {
+ fn op_cwd(_args: Value) -> Result<Value, AnyError> {
Ok(json!("cache:///"))
}
#[op]
- fn op_exists(_state: &mut OpState, _args: Value) -> Result<Value, AnyError> {
+ fn op_exists(_args: Value) -> Result<Value, AnyError> {
Ok(json!(false))
}
diff --git a/cli/ops/errors.rs b/cli/ops/errors.rs
index 5be6e0737..a219b462d 100644
--- a/cli/ops/errors.rs
+++ b/cli/ops/errors.rs
@@ -67,18 +67,12 @@ fn op_apply_source_map(
}
#[op]
-fn op_format_diagnostic(
- _state: &mut OpState,
- args: Value,
-) -> Result<Value, AnyError> {
+fn op_format_diagnostic(args: Value) -> Result<Value, AnyError> {
let diagnostic: Diagnostics = serde_json::from_value(args)?;
Ok(json!(diagnostic.to_string()))
}
#[op]
-fn op_format_file_name(
- _state: &mut OpState,
- file_name: String,
-) -> Result<String, AnyError> {
+fn op_format_file_name(file_name: String) -> Result<String, AnyError> {
Ok(format_file_name(&file_name))
}