summaryrefslogtreecommitdiff
path: root/op_crates/websocket/lib.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2021-03-19 22:55:37 +0530
committerGitHub <noreply@github.com>2021-03-19 13:25:37 -0400
commit91ca58fb2639a791237570e4f1fadda9eeb8c0bc (patch)
treeaa6faa41b9486a828952070f4ee337ad699e57ac /op_crates/websocket/lib.rs
parent197305908b721340041be03e5a11fe60a1711fb2 (diff)
chores: enforce type ResourceId across codebase (#9837)
Diffstat (limited to 'op_crates/websocket/lib.rs')
-rw-r--r--op_crates/websocket/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/op_crates/websocket/lib.rs b/op_crates/websocket/lib.rs
index 665444c9d..d32989450 100644
--- a/op_crates/websocket/lib.rs
+++ b/op_crates/websocket/lib.rs
@@ -18,6 +18,7 @@ use deno_core::JsRuntime;
use deno_core::OpState;
use deno_core::RcRef;
use deno_core::Resource;
+use deno_core::ResourceId;
use deno_core::ZeroCopyBuf;
use http::{Method, Request, Uri};
@@ -214,7 +215,7 @@ where
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SendArgs {
- rid: u32,
+ rid: ResourceId,
kind: String,
text: Option<String>,
}
@@ -245,7 +246,7 @@ pub async fn op_ws_send(
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CloseArgs {
- rid: u32,
+ rid: ResourceId,
code: Option<u16>,
reason: Option<String>,
}
@@ -277,7 +278,7 @@ pub async fn op_ws_close(
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NextEventArgs {
- rid: u32,
+ rid: ResourceId,
}
pub async fn op_ws_next_event(