We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85c22f2 commit 137eebeCopy full SHA for 137eebe
src/gateway/gateway.rs
@@ -241,7 +241,7 @@ impl DiscordWebSocket {
241
"📥 Received text message from gateway (length: {} chars)",
242
text.len()
243
);
244
- text
+ text.to_string()
245
}
246
Message::Binary(data) => {
247
log::debug!(
@@ -297,7 +297,7 @@ impl DiscordWebSocket {
297
/// println!("Created heartbeat message data: {:?}", heartbeat_data);
298
/// ```
299
pub async fn send_json(&mut self, message: WebSocketMessage) -> bool {
300
- let message = Message::Text(serde_json::to_string(&message).unwrap());
+ let message = Message::Text(serde_json::to_string(&message).unwrap().into());
301
match self.0.send(message).await {
302
Ok(_) => true,
303
0 commit comments