~qeef/wschat

54d01e8506e9d69314cd06114e4142edb12971bb — Jiri Vlasak 4 years ago ff1c59b
Fix warnings
1 files changed, 3 insertions(+), 3 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +3 -3
@@ 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) => {