mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-31 00:21:51 +01:00
Cargo fmt
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user