removed unused imports & unused serde-with dependency

This commit is contained in:
Jasper Hugo 2021-10-25 10:39:19 +07:00
parent d5c7662c1d
commit 16a33d7448
4 changed files with 3 additions and 9 deletions

1
Cargo.lock generated
View File

@ -755,7 +755,6 @@ dependencies = [
"ring",
"serde",
"serde_json",
"serde_with",
"tokio",
"tokio-stream",
"tokio-tungstenite",

View File

@ -31,7 +31,6 @@ rcgen = { version = "0.8", default-features = false }
ring = { version = "0.16", default-features = false }
serde = { version = "1", default-features = false, features = ["derive"] }
serde_json = { version = "1", default-features = false, features = ["std"] }
serde_with = { version = "1", default-features = false, features = ["macros"] }
tokio = { version = "1", default-features = false, features = ["rt-multi-thread", "macros", "sync", "time"] }
tokio-stream = { version = "0.1", default-features = false, features = ["time"] }
tokio-tungstenite = { version = "0.14", default-features = false, features = ["connect"] }

View File

@ -1,4 +1,4 @@
use std::{collections::HashMap, sync::Arc};
use std::sync::Arc;
use anyhow::Result;
use colibri::ColibriMessage;
@ -6,8 +6,6 @@ use futures::{
sink::SinkExt,
stream::{StreamExt, TryStreamExt},
};
use serde::{Deserialize, Serialize};
use serde_with::{serde_as, DisplayFromStr};
use tokio::sync::{mpsc, Mutex};
use tokio_stream::wrappers::ReceiverStream;
use tokio_tungstenite::tungstenite::{http::Request, Message};

View File

@ -5,7 +5,6 @@ use futures::{
sink::{Sink, SinkExt},
stream::{Stream, StreamExt, TryStreamExt},
};
use maplit::hashmap;
use tokio::sync::{mpsc, oneshot, Mutex};
use tokio_stream::wrappers::ReceiverStream;
use tokio_tungstenite::tungstenite::{
@ -13,7 +12,6 @@ use tokio_tungstenite::tungstenite::{
Message,
};
use tracing::{debug, error, info, warn};
use uuid::Uuid;
use xmpp_parsers::{
bind::{BindQuery, BindResponse},
disco::{DiscoInfoQuery, DiscoInfoResult},
@ -135,12 +133,12 @@ impl Connection {
}
pub async fn jid(&self) -> Option<FullJid> {
let mut locked_inner = self.inner.lock().await;
let locked_inner = self.inner.lock().await;
locked_inner.jid.clone()
}
pub async fn external_services(&self) -> Vec<xmpp::extdisco::Service> {
let mut locked_inner = self.inner.lock().await;
let locked_inner = self.inner.lock().await;
locked_inner.external_services.clone()
}