Cargo fmt

This commit is contained in:
Tim Kuehn
2016-03-16 20:43:36 -07:00
parent aec1574824
commit b0495ebc00
2 changed files with 9 additions and 5 deletions

View File

@@ -150,7 +150,7 @@ struct Server<'a, S: 'a, L>
impl<'a, S, L> Server<'a, S, L>
where S: Serve + 'static,
L: Listener,
L: Listener
{
fn serve<'b>(self, scope: &Scope<'b>)
where 'a: 'b

View File

@@ -34,10 +34,14 @@ impl super::Listener for UnixListener {
self.accept().map(|(stream, _)| stream)
}
fn dialer(&self) -> io::Result<UnixDialer<PathBuf>> {
self.local_addr().and_then(|addr| match addr.as_pathname() {
Some(path) => Ok(UnixDialer(path.to_owned())),
None => Err(io::Error::new(io::ErrorKind::AddrNotAvailable,
"Couldn't get a path to bound unix socket")),
self.local_addr().and_then(|addr| {
match addr.as_pathname() {
Some(path) => Ok(UnixDialer(path.to_owned())),
None => {
Err(io::Error::new(io::ErrorKind::AddrNotAvailable,
"Couldn't get a path to bound unix socket"))
}
}
})
}
}