async_client: Remove the transaction id.

master
Damir Jelić 2020-04-10 11:41:16 +02:00
parent c5f7af9118
commit 86617b42e2
1 changed files with 0 additions and 9 deletions

View File

@ -16,7 +16,6 @@
use std::collections::HashMap;
use std::convert::{TryFrom, TryInto};
use std::result::Result as StdResult;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
use std::time::{Duration, Instant};
@ -61,8 +60,6 @@ pub struct AsyncClient {
http_client: reqwest::Client,
/// User session data.
pub(crate) base_client: Arc<RwLock<BaseClient>>,
/// The transaction id.
transaction_id: Arc<AtomicU64>,
}
impl std::fmt::Debug for AsyncClient {
@ -248,7 +245,6 @@ impl AsyncClient {
homeserver,
http_client,
base_client: Arc::new(RwLock::new(BaseClient::new(session)?)),
transaction_id: Arc::new(AtomicU64::new(0)),
})
}
@ -626,11 +622,6 @@ impl AsyncClient {
Ok(response)
}
/// Get a new unique transaction id for the client.
fn transaction_id(&self) -> u64 {
self.transaction_id.fetch_add(1, Ordering::SeqCst)
}
/// Send a room message to the homeserver.
///
/// Returns the parsed response from the server.