diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2022-03-16 00:33:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 00:33:46 +0100 |
commit | bd481bf095f920a419ea55543f911e087f98f36f (patch) | |
tree | b4f97aabfd3734770c5367b1253511a02d86af87 /cli/ops/errors.rs | |
parent | 672f66dde1f7ec87282d37e10cac2cdd36e5f181 (diff) |
feat(ops): optional OpState (#13954)
Diffstat (limited to 'cli/ops/errors.rs')
-rw-r--r-- | cli/ops/errors.rs | 10 |
1 files changed, 2 insertions, 8 deletions
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)) } |