1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-26 19:41:12 +00:00

make AcceptorTimeout::new public

This commit is contained in:
Nikolay Kim 2018-10-02 19:31:30 -07:00
parent bbcd618304
commit 401ea574c0

View file

@ -182,7 +182,8 @@ pub struct AcceptorTimeout<T> {
}
impl<T: NewService> AcceptorTimeout<T> {
pub(crate) fn new(timeout: u64, inner: T) -> Self {
/// Create new `AcceptorTimeout` instance. timeout is in milliseconds.
pub fn new(timeout: u64, inner: T) -> Self {
Self {
inner,
timeout: Duration::from_millis(timeout),