Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Sep 22, 2023
1 parent 9a67f1a commit 3684550
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions mullvad-daemon/src/access_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ where
.map_err(Error::Settings)
}

pub async fn set_api_access_method(
&mut self,
access_method: AccessMethod,
) -> Result<(), Error> {
pub fn set_api_access_method(&mut self, access_method: AccessMethod) -> Result<(), Error> {
{
let mut connection_modes = self.connection_modes.lock().unwrap();
connection_modes.set_access_method(access_method);
Expand Down
5 changes: 2 additions & 3 deletions mullvad-daemon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ where
self.on_replace_api_access_method(tx, method).await
}
ToggleApiAccessMethod(tx, method) => self.on_toggle_api_access_method(tx, method).await,
SetApiAccessMethod(tx, method) => self.on_set_api_access_method(tx, method).await,
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),
GetCurrentVersion(tx) => self.on_get_current_version(tx),
Expand Down Expand Up @@ -2333,10 +2333,9 @@ where
Self::oneshot_send(tx, result, "toggle_api_access_method response");
}

async fn on_set_api_access_method(&mut self, tx: ResponseTx<(), Error>, method: AccessMethod) {
fn on_set_api_access_method(&mut self, tx: ResponseTx<(), Error>, method: AccessMethod) {
let result = self
.set_api_access_method(method)
.await
.map_err(Error::AccessMethodError);
Self::oneshot_send(tx, result, "set_api_access_method response");
}
Expand Down

0 comments on commit 3684550

Please sign in to comment.