summaryrefslogtreecommitdiff
path: root/runtime/ops/runtime.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ops/runtime.rs')
-rw-r--r--runtime/ops/runtime.rs6
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