1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

Add explicit dyns (#1041)

* Add explicit `dyn`s

* Remove unnecessary lines
This commit is contained in:
Yuki Okushi
2019-08-17 02:45:44 +09:00
committed by GitHub
parent 87b7162473
commit 23d768a77b
5 changed files with 5 additions and 8 deletions

View File

@ -269,9 +269,9 @@ where
.map(|protos| protos.windows(2).any(|w| w == H2))
.unwrap_or(false);
if h2 {
(Box::new(sock) as Box<Io>, Protocol::Http2)
(Box::new(sock) as Box<dyn Io>, Protocol::Http2)
} else {
(Box::new(sock) as Box<Io>, Protocol::Http1)
(Box::new(sock) as Box<dyn Io>, Protocol::Http1)
}
}),
),
@ -288,9 +288,9 @@ where
.map(|protos| protos.windows(2).any(|w| w == H2))
.unwrap_or(false);
if h2 {
(Box::new(sock) as Box<Io>, Protocol::Http2)
(Box::new(sock) as Box<dyn Io>, Protocol::Http2)
} else {
(Box::new(sock) as Box<Io>, Protocol::Http1)
(Box::new(sock) as Box<dyn Io>, Protocol::Http1)
}
}),
),