Remove async_trait

This commit is contained in:
Igor Katson 2024-05-03 13:17:24 +01:00
parent 1744f0c101
commit 573185bcfa
5 changed files with 0 additions and 5 deletions

1
Cargo.lock generated
View file

@ -1293,7 +1293,6 @@ version = "5.6.4"
dependencies = [
"anyhow",
"async-stream",
"async-trait",
"axum 0.7.5",
"backoff",
"base64 0.21.7",

View file

@ -76,7 +76,6 @@ memmap2 = { version = "0.9.4" }
rand_distr = { version = "0.4.3", optional = true }
lru = { version = "0.12.3", optional = true }
async-trait = "0.1.80"
[dev-dependencies]
futures = { version = "0.3" }

View file

@ -19,7 +19,6 @@ use tracing::trace;
use crate::{read_buf::ReadBuf, spawn_utils::BlockingSpawner};
#[async_trait::async_trait]
pub trait PeerConnectionHandler {
fn on_connected(&self, _connection_time: Duration) {}
fn get_have_bytes(&self) -> u64;

View file

@ -141,7 +141,6 @@ struct Handler {
locked: RwLock<Option<HandlerLocked>>,
}
#[async_trait::async_trait]
impl PeerConnectionHandler for Handler {
fn get_have_bytes(&self) -> u64 {
0

View file

@ -824,7 +824,6 @@ struct PeerHandler {
tx: PeerTx,
}
#[async_trait::async_trait]
impl<'a> PeerConnectionHandler for &'a PeerHandler {
fn on_connected(&self, connection_time: Duration) {
self.counters