1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 15:07:42 +02:00

remove deprecated on_connect methods (#1857)

This commit is contained in:
Rob Ede
2020-12-27 23:23:30 +00:00
committed by GitHub
parent 8c9ea43e23
commit 093d3a6c59
11 changed files with 8 additions and 146 deletions

View File

@ -662,10 +662,8 @@ async fn test_h1_service_error() {
async fn test_h1_on_connect() {
let srv = test_server(|| {
HttpService::build()
.on_connect(|_| 10usize)
.on_connect_ext(|_, data| data.insert(20isize))
.h1(|req: Request| {
assert!(req.extensions().contains::<usize>());
assert!(req.extensions().contains::<isize>());
future::ok::<_, ()>(Response::Ok().finish())
})