mirror of
https://github.com/fafhrd91/actix-net
synced 2025-08-31 10:46:58 +02:00
Replace derive_more
with declarative macros (#438)
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
use derive_more::{Deref, DerefMut};
|
||||
|
||||
use super::Host;
|
||||
use crate::impl_more;
|
||||
|
||||
/// Wraps underlying I/O and the connection request that initiated it.
|
||||
#[derive(Debug, Deref, DerefMut)]
|
||||
#[derive(Debug)]
|
||||
pub struct Connection<R, IO> {
|
||||
pub(crate) req: R,
|
||||
|
||||
#[deref]
|
||||
#[deref_mut]
|
||||
pub(crate) io: IO,
|
||||
}
|
||||
|
||||
impl_more::deref! { Connection<R, IO> => io: IO }
|
||||
impl_more::deref_mut! { Connection<R, IO> => io }
|
||||
|
||||
impl<R, IO> Connection<R, IO> {
|
||||
/// Construct new `Connection` from request and IO parts.
|
||||
pub(crate) fn new(req: R, io: IO) -> Self {
|
||||
|
Reference in New Issue
Block a user