happy_eyeballs: fix two mut warnings

This commit is contained in:
Emmanuel Gil Peyrot 2018-02-22 19:56:56 +01:00
parent 1a46449c16
commit 6ac5bb99db

View file

@ -45,7 +45,7 @@ impl Future for Connecter {
type Error = String; type Error = String;
fn poll(&mut self) -> Poll<Self::Item, Self::Error> { fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
match self.lookup.as_mut().map(|mut lookup| lookup.poll()) { match self.lookup.as_mut().map(|lookup| lookup.poll()) {
None | Some(Ok(Async::NotReady)) => (), None | Some(Ok(Async::NotReady)) => (),
Some(Ok(Async::Ready(found_srvs))) => { Some(Ok(Async::Ready(found_srvs))) => {
self.lookup = None; self.lookup = None;
@ -60,7 +60,7 @@ impl Future for Connecter {
return Err(format!("{}", e)), return Err(format!("{}", e)),
} }
match self.srvs.as_mut().map(|mut srv| srv.poll()) { match self.srvs.as_mut().map(|srv| srv.poll()) {
None | Some(Ok(Async::NotReady)) => (), None | Some(Ok(Async::NotReady)) => (),
Some(Ok(Async::Ready(None))) => Some(Ok(Async::Ready(None))) =>
self.srvs = None, self.srvs = None,