1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00
This commit is contained in:
Rob Ede
2021-10-19 01:32:58 +01:00
parent 6b3ea4fc61
commit efdf3ab1c3
8 changed files with 26 additions and 47 deletions

View File

@ -103,14 +103,9 @@ type ConnectCallback<IO> = dyn Fn(&IO, &mut Extensions);
///
/// # Implementation Details
/// Uses Option to reduce necessary allocations when merging with request extensions.
#[derive(Default)]
pub(crate) struct OnConnectData(Option<Extensions>);
impl Default for OnConnectData {
fn default() -> Self {
Self(None)
}
}
impl OnConnectData {
/// Construct by calling the on-connect callback with the underlying transport I/O.
pub(crate) fn from_io<T>(