diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/ops/web_worker/sync_fetch.rs | 3 | ||||
-rw-r--r-- | runtime/permissions/mod.rs | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/runtime/ops/web_worker/sync_fetch.rs b/runtime/ops/web_worker/sync_fetch.rs index 9d356f5ee..69adec051 100644 --- a/runtime/ops/web_worker/sync_fetch.rs +++ b/runtime/ops/web_worker/sync_fetch.rs @@ -57,8 +57,7 @@ pub fn op_worker_sync_fetch( let runtime = tokio::runtime::Builder::new_current_thread() .enable_io() .enable_time() - .build() - .unwrap(); + .build()?; let handles: Vec<_> = scripts .into_iter() diff --git a/runtime/permissions/mod.rs b/runtime/permissions/mod.rs index 024aa81d9..5424a3f36 100644 --- a/runtime/permissions/mod.rs +++ b/runtime/permissions/mod.rs @@ -427,7 +427,7 @@ impl UnaryPermission<ReadDescriptor> { self.prompt, ); if prompted { - let resolved_path = resolve_from_cwd(path).unwrap(); + let resolved_path = resolve_from_cwd(path)?; if result.is_ok() { self.granted_list.insert(ReadDescriptor(resolved_path)); } else { @@ -446,7 +446,7 @@ impl UnaryPermission<ReadDescriptor> { display: &str, api_name: &str, ) -> Result<(), AnyError> { - let resolved_path = resolve_from_cwd(path).unwrap(); + let resolved_path = resolve_from_cwd(path)?; let (result, prompted) = self.query(Some(&resolved_path)).check( self.name, Some(api_name), @@ -600,7 +600,7 @@ impl UnaryPermission<WriteDescriptor> { self.prompt, ); if prompted { - let resolved_path = resolve_from_cwd(path).unwrap(); + let resolved_path = resolve_from_cwd(path)?; if result.is_ok() { self.granted_list.insert(WriteDescriptor(resolved_path)); } else { |