Clean up some clippy warnings

O01eg
Sep 13, 2022, 9:20 AM
3EKAR2UJ2OUTH3HZY2F42CI5I3QU2GQUK6CH6VOIF4CFXF64RKPAC

Dependencies

  • [2] S7A7LHUN Fix some warnings
  • [3] T5VMNBHR Fix other warnings
  • [4] RNQTHBRI Accept all previous HTTP API
  • [5] EVIOKGS2 Don''t break threads and channel after disconnection
  • [6] VXJOXN2O Update dependencies
  • [7] GVI6M6SC Send ping to custom jid
  • [8] 3RMEABMU Prepare to add HTTP API to ping cutom jids
  • [9] TGO4TIWU Fix README

Change contents

  • replacement in src/main.rs at line 98
    [3.46995][3.46995:47070]()
    .body(Body::from(format!("Accepted")))
    [3.46995]
    [3.47070]
    .body(Body::from("Accepted".to_string()))
  • replacement in src/main.rs at line 104
    [3.47405][3.47405:47500]()
    .body(Body::from(format!("Cann't get presence text")))
    [3.47405]
    [3.47500]
    .body(Body::from("Cann't get presence text".to_string()))
  • replacement in src/main.rs at line 111
    [3.47787][3.47787:47870]()
    .body(Body::from(format!("Cann't get presence text")))
    [3.47787]
    [3.0]
    .body(Body::from("Cann't get presence text".to_string()))
  • replacement in src/main.rs at line 128
    [3.502][3.502:573]()
    .body(Body::from(format!("Accepted")))
    [3.502]
    [3.573]
    .body(Body::from("Accepted".to_string()))
  • replacement in src/main.rs at line 134
    [3.884][3.884:967]()
    .body(Body::from(format!("Cann't send ping")))
    [3.884]
    [3.967]
    .body(Body::from("Cann't send ping".to_string()))
  • replacement in src/main.rs at line 147
    [3.1581][3.1581:1660]()
    .body(Body::from(format!("Accepted")))
    [3.1581]
    [3.1660]
    .body(Body::from("Accepted".to_string()))
  • replacement in src/main.rs at line 153
    [3.2014][3.2014:2112]()
    .body(Body::from(format!("Cann't get message text")))
    [3.2014]
    [3.2112]
    .body(Body::from("Cann't get message text".to_string()))
  • replacement in src/main.rs at line 160
    [3.2360][3.2360:2446]()
    .body(Body::from(format!("Cann't get message text")))
    [3.2360]
    [3.2446]
    .body(Body::from("Cann't get message text".to_string()))
  • replacement in src/main.rs at line 181
    [3.2161][3.2161:2236]()
    .body(Body::from(format!("Accepted")))
    [3.2161]
    [3.2236]
    .body(Body::from("Accepted".to_string()))
  • replacement in src/main.rs at line 187
    [3.2576][3.2576:2676]()
    .body(Body::from(format!("Cann't get chat presence text")))
    [3.2576]
    [3.2676]
    .body(Body::from(
    "Cann't get chat presence text".to_string(),
    ))
  • replacement in src/main.rs at line 196
    [3.2963][3.2963:3051]()
    .body(Body::from(format!("Cann't get chat presence text")))
    [3.2963]
    [3.3051]
    .body(Body::from("Cann't get chat presence text".to_string()))
  • replacement in src/main.rs at line 212
    [3.3725][3.3725:3800]()
    .body(Body::from(format!("Accepted")))
    [3.3725]
    [3.3800]
    .body(Body::from("Accepted".to_string()))
  • replacement in src/main.rs at line 218
    [3.4139][3.4139:4238]()
    .body(Body::from(format!("Cann't get chat message text")))
    [3.4139]
    [3.4238]
    .body(Body::from(
    "Cann't get chat message text".to_string(),
    ))
  • replacement in src/main.rs at line 227
    [3.4525][3.4525:4612]()
    .body(Body::from(format!("Cann't get chat message text")))
    [3.4525]
    [3.4612]
    .body(Body::from("Cann't get chat message text".to_string()))
  • replacement in src/main.rs at line 293
    [3.50523][2.283:475]()
    match tokio::signal::ctrl_c().await {
    Err(e) => {
    error!("Stop signal registering failed {}", e);
    return;
    }
    _ => {}
    [3.50523]
    [2.475]
    if let Err(e) = tokio::signal::ctrl_c().await {
    error!("Stop signal registering failed {}", e);
  • replacement in src/main.rs at line 319
    [3.51437][2.550:589]()
    match cmd_send
    [3.51437]
    [3.505]
    if let Err(e) = cmd_send
  • replacement in src/main.rs at line 324
    [2.651][2.651:830]()
    Err(e) => {
    error!("Cann't send global ping {}", e);
    }
    _ => {}
    [2.651]
    [2.830]
    error!("Cann't send global ping {}", e);
  • replacement in src/main.rs at line 326
    [2.856][2.856:1120]()
    match cmd_send.send(XmppCommand::TimeoutCleanup).await {
    Err(e) => {
    error!("Cann't send timeout cleanup {}", e);
    }
    _ => {}
    [2.856]
    [2.1120]
    if let Err(e) = cmd_send.send(XmppCommand::TimeoutCleanup).await {
    error!("Cann't send timeout cleanup {}", e);