From 3f49a5ce8feb5604249c4aa4782212bb4619ce32 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 27 Dec 2020 16:44:08 +0000 Subject: [PATCH] remove internal DataFactory trait --- actix-http/CHANGES.md | 7 +++++++ actix-http/src/helpers.rs | 14 -------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index 81577688d..c43246bb0 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -4,6 +4,13 @@ ### Changed * Bumped `rand` to `0.8` +### Removed +* Deprecated `on_connect` methods have been removed. Prefer the new + `on_connect_ext` technique. [#1857] + +[#1857]: https://github.com/actix/actix-web/pull/1857 + + ## 2.2.0 - 2020-11-25 ### Added * HttpResponse builders for 1xx status codes. [#1768] diff --git a/actix-http/src/helpers.rs b/actix-http/src/helpers.rs index ac0e0f118..13195f7db 100644 --- a/actix-http/src/helpers.rs +++ b/actix-http/src/helpers.rs @@ -3,8 +3,6 @@ use std::io; use bytes::{BufMut, BytesMut}; use http::Version; -use crate::extensions::Extensions; - const DIGITS_START: u8 = b'0'; pub(crate) fn write_status_line(version: Version, n: u16, bytes: &mut BytesMut) { @@ -56,18 +54,6 @@ impl<'a> io::Write for Writer<'a> { } } -pub(crate) trait DataFactory { - fn set(&self, ext: &mut Extensions); -} - -pub(crate) struct Data(pub(crate) T); - -impl DataFactory for Data { - fn set(&self, ext: &mut Extensions) { - ext.insert(self.0.clone()) - } -} - #[cfg(test)] mod tests { use std::str::from_utf8;