mirror of
https://github.com/openharmony/third_party_rust_hyper.git
synced 2026-07-19 13:54:29 -04:00
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:
committed by
Sean McArthur
parent
e4afa59a74
commit
907bc100e5
+1
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user