feat(server): give Server::local_addr a more general type

Allows `local_addr` to work for any executor type, rather than just the default `Exec`. The
underlying `SpawnAll::local_addr()` is already similarly general, so no other changes are needed
other than adding the extra type parameter to the `impl`.
This commit is contained in:
Adam C. Foltzer
2019-12-02 15:45:22 -08:00
committed by Sean McArthur
parent e4afa59a74
commit 907bc100e5
+1 -1
View File
@@ -134,7 +134,7 @@ impl Server<AddrIncoming, ()> {
}
#[cfg(feature = "tcp")]
impl<S> Server<AddrIncoming, S> {
impl<S, E> Server<AddrIncoming, S, E> {
/// Returns the local address that this server is bound to.
pub fn local_addr(&self) -> SocketAddr {
self.spawn_all.local_addr()