diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-10-22 01:41:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-22 01:41:08 -0700 |
commit | f26c8bcf3167069ccd8ac3beb9185d1bf480a83f (patch) | |
tree | 6c83977b6d2e5b2cbfef9e8bde17188d5cc18347 /runtime/ops/runtime.rs | |
parent | 67280f8b558902729c805fd3d8f26d4c434fc211 (diff) |
refactor(runtime/ops): use concrete error types (#26409)
Diffstat (limited to 'runtime/ops/runtime.rs')
-rw-r--r-- | runtime/ops/runtime.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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<String, AnyError> { +fn op_main_module(state: &mut OpState) -> String { let main_url = state.borrow::<ModuleSpecifier>(); - 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 |