Skip to content

Commit

Permalink
Fix clippy lint
Browse files Browse the repository at this point in the history
Fix `clippy` lint "unused `async` for function with no await statements"
  • Loading branch information
MarkusPettersson98 committed Sep 28, 2023
1 parent 4e04698 commit 0d49d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mullvad-daemon/src/access_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ where

/// Return the [`AccessMethodSetting`] which is currently used to access the
/// Mullvad API.
pub async fn get_current_access_method(&mut self) -> Result<AccessMethodSetting, Error> {
pub fn get_current_access_method(&mut self) -> Result<AccessMethodSetting, Error> {
let connections_modes = self.connection_modes.lock().unwrap();
Ok(connections_modes.peek())
}
Expand Down
8 changes: 2 additions & 6 deletions mullvad-daemon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ where
}
RemoveApiAccessMethod(tx, method) => self.on_remove_api_access_method(tx, method).await,
UpdateApiAccessMethod(tx, method) => self.on_update_api_access_method(tx, method).await,
GetCurrentAccessMethod(tx) => self.on_get_current_api_access_method(tx).await,
GetCurrentAccessMethod(tx) => self.on_get_current_api_access_method(tx),
SetApiAccessMethod(tx, method) => self.on_set_api_access_method(tx, method),
GetApiAddresses(tx) => self.on_get_api_addresses(tx).await,
IsPerformingPostUpgrade(tx) => self.on_is_performing_post_upgrade(tx),
Expand Down Expand Up @@ -2307,13 +2307,9 @@ where
Self::oneshot_send(tx, result, "update_api_access_method response");
}

async fn on_get_current_api_access_method(
&mut self,
tx: ResponseTx<AccessMethodSetting, Error>,
) {
fn on_get_current_api_access_method(&mut self, tx: ResponseTx<AccessMethodSetting, Error>) {
let result = self
.get_current_access_method()
.await
.map_err(Error::AccessMethodError);
Self::oneshot_send(tx, result, "get_current_api_access_method response");
}
Expand Down

0 comments on commit 0d49d99

Please sign in to comment.