diff options
| author | Andreu Botella <andreu@andreubotella.com> | 2022-05-13 10:36:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-13 10:36:31 +0200 |
| commit | 3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad (patch) | |
| tree | 7fcc92da290889d3d2290f6e4902ac60685aae87 /cli/build.rs | |
| parent | 0ee76da07b12fba38962634e65853d73adf9d4c0 (diff) | |
chore(runtime): Make some ops in ext and runtime infallible. (#14589)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
Diffstat (limited to 'cli/build.rs')
| -rw-r--r-- | cli/build.rs | 17 |
1 files changed, 7 insertions, 10 deletions
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<Value, AnyError> { + fn op_build_info(state: &mut OpState) -> Value { let build_specifier = "asset:///bootstrap.ts"; let build_libs = state.borrow::<Vec<&str>>(); - Ok(json!({ + json!({ "buildSpecifier": build_specifier, "libs": build_libs, - })) + }) } #[op] - fn op_cwd(_args: Value) -> Result<Value, AnyError> { - Ok(json!("cache:///")) + fn op_cwd() -> String { + "cache:///".into() } #[op] - fn op_exists(_args: Value) -> Result<Value, AnyError> { - Ok(json!(false)) + fn op_exists() -> bool { + false } #[op] |
