summaryrefslogtreecommitdiff
path: root/cli/build.rs
diff options
context:
space:
mode:
authorAndreu Botella <andreu@andreubotella.com>2022-05-13 10:36:31 +0200
committerGitHub <noreply@github.com>2022-05-13 10:36:31 +0200
commit3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad (patch)
tree7fcc92da290889d3d2290f6e4902ac60685aae87 /cli/build.rs
parent0ee76da07b12fba38962634e65853d73adf9d4c0 (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.rs17
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]