mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-23 19:48:19 +00:00
Merge redundant impl Connecting blocks
This commit is contained in:
+8
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user