Skip to content

Commit

Permalink
[Clippy] Fix unused async
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Dec 12, 2023
1 parent 589588b commit 9258776
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/test-manager/src/mullvad_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl RpcClientProvider {
}
}

pub async fn new_rpc_client(
pub fn new_rpc_client(
connection_handle: ConnectionHandle,
mullvad_daemon_transport: GrpcForwarder,
) -> RpcClientProvider {
Expand Down
4 changes: 2 additions & 2 deletions test/test-manager/src/run_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub async fn run(
let serial_stream =
tokio_serial::SerialStream::open(&tokio_serial::new(pty_path, BAUD)).unwrap();
let (runner_transport, mullvad_daemon_transport, mut connection_handle, completion_handle) =
test_rpc::transport::create_client_transports(serial_stream).await?;
test_rpc::transport::create_client_transports(serial_stream)?;

if !skip_wait {
connection_handle.wait_for_server().await?;
Expand All @@ -45,7 +45,7 @@ pub async fn run(

let client = ServiceClient::new(connection_handle.clone(), runner_transport);
let mullvad_client =
mullvad_daemon::new_rpc_client(connection_handle, mullvad_daemon_transport).await;
mullvad_daemon::new_rpc_client(connection_handle, mullvad_daemon_transport);

let mut tests: Vec<_> = inventory::iter::<tests::TestMetadata>().collect();
tests.sort_by_key(|test| test.priority.unwrap_or(0));
Expand Down
2 changes: 1 addition & 1 deletion test/test-rpc/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub fn create_server_transports(
(runner_forwarder_1, daemon_rx, completion_handle)
}

pub async fn create_client_transports(
pub fn create_client_transports(
serial_stream: impl AsyncRead + AsyncWrite + Unpin + Send + 'static,
) -> Result<
(
Expand Down
2 changes: 1 addition & 1 deletion test/test-runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl Service for TestServer {
_: context::Context,
interface: String,
) -> Result<IpAddr, test_rpc::Error> {
net::get_interface_ip(&interface).await
net::get_interface_ip(&interface)
}

async fn get_default_interface(self, _: context::Context) -> Result<String, test_rpc::Error> {
Expand Down
4 changes: 2 additions & 2 deletions test/test-runner/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ pub async fn send_ping(
}

#[cfg(unix)]
pub async fn get_interface_ip(interface: &str) -> Result<IpAddr, test_rpc::Error> {
pub fn get_interface_ip(interface: &str) -> Result<IpAddr, test_rpc::Error> {
// TODO: IPv6
use std::net::Ipv4Addr;

Expand All @@ -225,7 +225,7 @@ pub async fn get_interface_ip(interface: &str) -> Result<IpAddr, test_rpc::Error
}

#[cfg(target_os = "windows")]
pub async fn get_interface_ip(interface: &str) -> Result<IpAddr, test_rpc::Error> {
pub fn get_interface_ip(interface: &str) -> Result<IpAddr, test_rpc::Error> {
// TODO: IPv6

get_interface_ip_for_family(interface, talpid_windows::net::AddressFamily::Ipv4)
Expand Down
1 change: 1 addition & 0 deletions test/test-runner/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ pub async fn set_daemon_log_level(verbosity_level: Verbosity) -> Result<(), test
}

#[cfg(target_os = "macos")]
#[allow(clippy::unused_async)]
pub async fn set_daemon_log_level(_verbosity_level: Verbosity) -> Result<(), test_rpc::Error> {
// TODO: Not implemented
log::warn!("Setting log level is not implemented on macOS");
Expand Down

0 comments on commit 9258776

Please sign in to comment.