From 3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Fri, 13 May 2022 10:36:31 +0200 Subject: chore(runtime): Make some ops in ext and runtime infallible. (#14589) Co-authored-by: Aaron O'Mullan --- cli/build.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'cli/build.rs') diff --git a/cli/build.rs b/cli/build.rs index 89afe642c..019f8d02d 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -178,26 +178,23 @@ fn create_compiler_snapshot( } #[op] - fn op_build_info( - state: &mut OpState, - _args: Value, - ) -> Result { + fn op_build_info(state: &mut OpState) -> Value { let build_specifier = "asset:///bootstrap.ts"; let build_libs = state.borrow::>(); - Ok(json!({ + json!({ "buildSpecifier": build_specifier, "libs": build_libs, - })) + }) } #[op] - fn op_cwd(_args: Value) -> Result { - Ok(json!("cache:///")) + fn op_cwd() -> String { + "cache:///".into() } #[op] - fn op_exists(_args: Value) -> Result { - Ok(json!(false)) + fn op_exists() -> bool { + false } #[op] -- cgit v1.2.3