diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2021-03-19 22:55:37 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 13:25:37 -0400 |
commit | 91ca58fb2639a791237570e4f1fadda9eeb8c0bc (patch) | |
tree | aa6faa41b9486a828952070f4ee337ad699e57ac /runtime/ops/process.rs | |
parent | 197305908b721340041be03e5a11fe60a1711fb2 (diff) |
chores: enforce type ResourceId across codebase (#9837)
Diffstat (limited to 'runtime/ops/process.rs')
-rw-r--r-- | runtime/ops/process.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index bea4708f7..437cfac76 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -16,6 +16,7 @@ use deno_core::BufVec; use deno_core::OpState; use deno_core::RcRef; use deno_core::Resource; +use deno_core::ResourceId; use deno_core::ZeroCopyBuf; use serde::Deserialize; use std::borrow::Cow; @@ -34,7 +35,7 @@ pub fn init(rt: &mut deno_core::JsRuntime) { fn clone_file( state: &mut OpState, - rid: u32, + rid: ResourceId, ) -> Result<std::fs::File, AnyError> { StdFileResource::with(state, rid, move |r| match r { Ok(std_file) => std_file.try_clone().map_err(AnyError::from), @@ -60,9 +61,9 @@ pub struct RunArgs { stdin: String, stdout: String, stderr: String, - stdin_rid: u32, - stdout_rid: u32, - stderr_rid: u32, + stdin_rid: ResourceId, + stdout_rid: ResourceId, + stderr_rid: ResourceId, } struct ChildResource { @@ -178,7 +179,7 @@ fn op_run( #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct RunStatusArgs { - rid: u32, + rid: ResourceId, } async fn op_run_status( |