From 3f08a40412d89bd54222ad51fc1aaeb508e2e5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 3 May 2022 19:45:57 +0200 Subject: refactor: add core.formatLocationFilename, remove op_format_filename (#14474) This commit moves "op_format_location" to "core/ops_builtin.rs" and removes "Deno.core.createPrepareStackTrace" in favor of "Deno.core.prepareStackTrace". Co-authored-by: Aaron O'Mullan --- cli/ops/errors.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'cli/ops/errors.rs') diff --git a/cli/ops/errors.rs b/cli/ops/errors.rs index f0f5fce04..19c64c712 100644 --- a/cli/ops/errors.rs +++ b/cli/ops/errors.rs @@ -1,7 +1,6 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. use crate::diagnostics::Diagnostics; -use crate::fmt_errors::format_file_name; use deno_core::error::AnyError; use deno_core::op; use deno_core::serde_json; @@ -11,10 +10,7 @@ use deno_core::Extension; pub fn init() -> Extension { Extension::builder() - .ops(vec![ - op_format_diagnostic::decl(), - op_format_file_name::decl(), - ]) + .ops(vec![op_format_diagnostic::decl()]) .build() } @@ -23,8 +19,3 @@ fn op_format_diagnostic(args: Value) -> Result { let diagnostic: Diagnostics = serde_json::from_value(args)?; Ok(json!(diagnostic.to_string())) } - -#[op] -fn op_format_file_name(file_name: String) -> Result { - Ok(format_file_name(&file_name)) -} -- cgit v1.2.3