Merge redundant impl Connecting blocks

This commit is contained in:
Benjamin Saunders
2023-06-11 16:38:36 -07:00
parent 926f927135
commit 7914468e27
+8 -10
View File
@@ -157,6 +157,14 @@ impl Connecting {
inner.inner.local_ip()
}
/// The peer's UDP address.
///
/// Will panic if called after `poll` has returned `Ready`.
pub fn remote_address(&self) -> SocketAddr {
let conn_ref: &ConnectionRef = self.conn.as_ref().expect("used after yielding Ready");
conn_ref.state.lock("remote_address").inner.remote_address()
}
}
impl Future for Connecting {
@@ -178,16 +186,6 @@ impl Future for Connecting {
}
}
impl Connecting {
/// The peer's UDP address.
///
/// Will panic if called after `poll` has returned `Ready`.
pub fn remote_address(&self) -> SocketAddr {
let conn_ref: &ConnectionRef = self.conn.as_ref().expect("used after yielding Ready");
conn_ref.state.lock("remote_address").inner.remote_address()
}
}
/// Future that completes when a connection is fully established
///
/// For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting