Skip to content

Commit 7dcd84a

Browse files
authored
fix(rpc): allow default deserialization value for subscription data tag (#7)
1 parent 918b8c5 commit 7dcd84a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

relay_client/src/client/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use {
3232

3333
pub type SocketStream = WebSocketStream<MaybeTlsStream<TcpStream>>;
3434

35-
/// Opens a cnnection to the Relay and returns [`ClientStream`] for the
35+
/// Opens a connection to the Relay and returns [`ClientStream`] for the
3636
/// connection.
3737
pub async fn create_stream(opts: ConnectionOptions) -> Result<ClientStream, Error> {
3838
let (socket, _) = connect_async(opts.into_request()?)

relay_rpc/src/rpc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ pub struct SubscriptionData {
534534

535535
/// A label that identifies what type of message is sent based on the RPC
536536
/// method used.
537+
#[serde(default, skip_serializing_if = "is_default")]
537538
pub tag: u32,
538539
}
539540

0 commit comments

Comments
 (0)