Rename addr <-> url

This commit is contained in:
Matteo Settenvini 2023-05-03 07:33:17 +02:00
parent d3f23b7956
commit 5c562b2ff5
Signed by: matteo
GPG Key ID: CCF27A3AD054D593
1 changed files with 6 additions and 6 deletions

View File

@ -27,8 +27,8 @@ const RENDEZVOUS: &'static str = "[::1]:10000";
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn Error>> {
let url = RENDEZVOUS.parse()?;
let incoming = TcpIncoming::new(url, true, None).expect("Cannot bind server socket");
let addr = RENDEZVOUS.parse()?;
let incoming = TcpIncoming::new(addr, true, None).expect("Cannot bind server socket");
run_server(incoming).await?;
Ok(())
}
@ -127,8 +127,8 @@ mod test {
#[tokio::test]
async fn bidi_streaming() -> Result<(), Box<dyn std::error::Error>> {
let url = RENDEZVOUS.parse()?;
let incoming = TcpIncoming::new(url, true, None).expect("Cannot bind server socket");
let addr = RENDEZVOUS.parse()?;
let incoming = TcpIncoming::new(addr, true, None).expect("Cannot bind server socket");
tokio::spawn(run_server(incoming));
// This is the number of messages to broadcast
@ -137,8 +137,8 @@ mod test {
const CLIENT_IDS: &[&str] = &["client AAA", "client BBB", "client CCC"];
async fn client(id: &str, mock: &MockMessageChecker) {
let addr = format!("http://{}", RENDEZVOUS);
let mut client = ServiceClient::connect(addr).await.unwrap();
let url = format!("http://{}", RENDEZVOUS);
let mut client = ServiceClient::connect(url).await.unwrap();
let client_id = String::from(id);
let outbound = async_stream::stream! {