@@ 1,5 1,5 @@
use chrono::Utc;
-use futures::{FutureExt, StreamExt};
+use futures::StreamExt;
use jsonwebtoken::{DecodingKey, Validation, Algorithm};
use serde::{Deserialize, Serialize};
use serde_json::Value;
@@ 71,7 71,7 @@ async fn send_msg(msg: Message, clients: &Clients) {
};
let mut val = Validation::new(Algorithm::HS256);
val.validate_exp = false;
- let payload = if let Ok(p) = jsonwebtoken::decode::<Claims>(
+ let _payload = if let Ok(p) = jsonwebtoken::decode::<Claims>(
token,
&DecodingKey::from_secret(jwt_secret.as_ref()),
&val,
@@ 85,7 85,7 @@ async fn send_msg(msg: Message, clients: &Clients) {
}
msg["tim"] = serde_json::json!(Utc::now());
for (&_id, tx) in clients.read().await.iter() {
- tx.send(Ok(Message::text(msg.to_string())));
+ tx.send(Ok(Message::text(msg.to_string()))).expect("failed to send");
}
match env::var("LOG_DIR") {
Ok(dname) => {