From f26c8bcf3167069ccd8ac3beb9185d1bf480a83f Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Tue, 22 Oct 2024 01:41:08 -0700 Subject: refactor(runtime/ops): use concrete error types (#26409) --- runtime/ops/runtime.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'runtime/ops/runtime.rs') diff --git a/runtime/ops/runtime.rs b/runtime/ops/runtime.rs index 419274ebd..8d54783fc 100644 --- a/runtime/ops/runtime.rs +++ b/runtime/ops/runtime.rs @@ -1,6 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use deno_core::error::AnyError; use deno_core::op2; use deno_core::ModuleSpecifier; use deno_core::OpState; @@ -16,10 +15,9 @@ deno_core::extension!( #[op2] #[string] -fn op_main_module(state: &mut OpState) -> Result { +fn op_main_module(state: &mut OpState) -> String { let main_url = state.borrow::(); - let main_path = main_url.to_string(); - Ok(main_path) + main_url.to_string() } /// This is an op instead of being done at initialization time because -- cgit v1.2.3