Skip to content

Commit

Permalink
chore: use with_... to init params (test canister)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilbertt committed Dec 9, 2023
1 parent 6add8d1 commit 55ad121
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/test_canister/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ fn init(max_number_of_returned_messages: usize, send_ack_interval_ms: u64) {
on_close: Some(on_close),
};

let params = WsInitParams {
handlers,
max_number_of_returned_messages,
send_ack_interval_ms,
};
let params = WsInitParams::new(handlers)
.with_max_number_of_returned_messages(max_number_of_returned_messages)
.with_send_ack_interval_ms(send_ack_interval_ms);

ic_websocket_cdk::init(params)
}
Expand Down

0 comments on commit 55ad121

Please sign in to comment.