Naming consistency

This commit is contained in:
Benjamin Saunders
2020-01-10 00:34:18 -08:00
committed by Dirkjan Ochtman
parent 325e5938f5
commit 505e79e6ed
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -3022,7 +3022,7 @@ where
}
/// The latest socket address for this connection's peer
pub fn remote(&self) -> SocketAddr {
pub fn remote_address(&self) -> SocketAddr {
self.path.remote
}
+4 -1
View File
@@ -778,7 +778,10 @@ fn migration() {
pair.client_conn_mut(client_ch).ping();
pair.drive();
assert_matches!(pair.client_conn_mut(client_ch).poll(), None);
assert_eq!(pair.server_conn_mut(server_ch).remote(), pair.client.addr);
assert_eq!(
pair.server_conn_mut(server_ch).remote_address(),
pair.client.addr
);
}
fn test_flow_control(config: TransportConfig, window_size: usize) {
+2 -2
View File
@@ -113,7 +113,7 @@ impl Connecting {
/// Will panic if called after `poll` has returned `Ready`.
pub fn remote_address(&self) -> SocketAddr {
let conn_ref: &ConnectionRef = &self.0.as_ref().expect("used after yielding Ready").0;
conn_ref.lock().unwrap().inner.remote()
conn_ref.lock().unwrap().inner.remote_address()
}
}
@@ -317,7 +317,7 @@ impl Connection {
/// If `ServerConfig::migration` is `true`, clients may change addresses at will, e.g. when
/// switching to a cellular internet connection.
pub fn remote_address(&self) -> SocketAddr {
self.0.lock().unwrap().inner.remote()
self.0.lock().unwrap().inner.remote_address()
}
/// The negotiated application protocol