1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00

correct spelling of ConnectError::Unresolved (#1487)

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
This commit is contained in:
Rob Ede 2020-05-07 18:26:48 +01:00 committed by GitHub
parent 9164ed1f0c
commit 9d94fb91b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -48,7 +48,7 @@ pub enum ConnectError {
/// Unresolved host name /// Unresolved host name
#[display(fmt = "Connector received `Connect` method with unresolved host")] #[display(fmt = "Connector received `Connect` method with unresolved host")]
Unresolverd, Unresolved,
/// Connection io error /// Connection io error
#[display(fmt = "{}", _0)] #[display(fmt = "{}", _0)]
@ -63,7 +63,7 @@ impl From<actix_connect::ConnectError> for ConnectError {
actix_connect::ConnectError::Resolver(e) => ConnectError::Resolver(e), actix_connect::ConnectError::Resolver(e) => ConnectError::Resolver(e),
actix_connect::ConnectError::NoRecords => ConnectError::NoRecords, actix_connect::ConnectError::NoRecords => ConnectError::NoRecords,
actix_connect::ConnectError::InvalidInput => panic!(), actix_connect::ConnectError::InvalidInput => panic!(),
actix_connect::ConnectError::Unresolverd => ConnectError::Unresolverd, actix_connect::ConnectError::Unresolved => ConnectError::Unresolved,
actix_connect::ConnectError::Io(e) => ConnectError::Io(e), actix_connect::ConnectError::Io(e) => ConnectError::Io(e),
} }
} }

View File

@ -105,7 +105,7 @@ where
let key = if let Some(authority) = req.uri.authority() { let key = if let Some(authority) = req.uri.authority() {
authority.clone().into() authority.clone().into()
} else { } else {
return Err(ConnectError::Unresolverd); return Err(ConnectError::Unresolved);
}; };
// acquire connection // acquire connection
@ -195,7 +195,7 @@ where
if let Some(i) = self.inner.take() { if let Some(i) = self.inner.take() {
let mut inner = i.as_ref().borrow_mut(); let mut inner = i.as_ref().borrow_mut();
inner.release_waiter(&self.key, self.token); inner.release_waiter(&self.key, self.token);
inner.check_availibility(); inner.check_availability();
} }
} }
} }
@ -232,7 +232,7 @@ where
if let Some(i) = self.inner.take() { if let Some(i) = self.inner.take() {
let mut inner = i.as_ref().borrow_mut(); let mut inner = i.as_ref().borrow_mut();
inner.release(); inner.release();
inner.check_availibility(); inner.check_availability();
} }
} }
} }
@ -359,7 +359,7 @@ where
created, created,
used: Instant::now(), used: Instant::now(),
}); });
self.check_availibility(); self.check_availability();
} }
fn release_close(&mut self, io: ConnectionType<Io>) { fn release_close(&mut self, io: ConnectionType<Io>) {
@ -369,10 +369,10 @@ where
actix_rt::spawn(CloseConnection::new(io, timeout)) actix_rt::spawn(CloseConnection::new(io, timeout))
} }
} }
self.check_availibility(); self.check_availability();
} }
fn check_availibility(&self) { fn check_availability(&self) {
if !self.waiters_queue.is_empty() && self.acquired < self.config.limit { if !self.waiters_queue.is_empty() && self.acquired < self.config.limit {
self.waker.wake(); self.waker.wake();
} }
@ -534,7 +534,7 @@ where
if let Some(inner) = self.project().inner.take() { if let Some(inner) = self.project().inner.take() {
let mut inner = inner.as_ref().borrow_mut(); let mut inner = inner.as_ref().borrow_mut();
inner.release(); inner.release();
inner.check_availibility(); inner.check_availability();
} }
} }
} }