From 29f6b2efaf2e5933a7f6d4c36b667331835cedce Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sun, 25 Feb 2024 02:12:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E5=92=8C=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ica-rs/src/data_struct/messages.rs | 2 +- ica-rs/src/events.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ica-rs/src/data_struct/messages.rs b/ica-rs/src/data_struct/messages.rs index 28ab063..ea187b5 100644 --- a/ica-rs/src/data_struct/messages.rs +++ b/ica-rs/src/data_struct/messages.rs @@ -18,7 +18,7 @@ pub enum At { } impl At { - /// new_from_json(&message["at"]) + #[inline] pub fn new_from_json(json: &JsonValue) -> Self { match json { JsonValue::Bool(b) => Self::Bool(*b), diff --git a/ica-rs/src/events.rs b/ica-rs/src/events.rs index b6574a9..d4a610b 100644 --- a/ica-rs/src/events.rs +++ b/ica-rs/src/events.rs @@ -51,7 +51,6 @@ pub async fn add_message(payload: Payload, client: Client) { pub async fn set_messages(payload: Payload, _client: Client) { if let Payload::Text(values) = payload { if let Some(value) = values.first() { - println!("{:#?}", value); let messages: Vec = serde_json::from_value(value["messages"].clone()).unwrap(); let room_id = value["roomId"].as_i64().unwrap(); info!("set_messages {} len: {}", room_id.to_string().cyan(), messages.len());