Skip to content

Commit

Permalink
fixup! Remove unnecessary mutability in AccountsProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkisemils committed Feb 6, 2024
1 parent 2003035 commit 65f05db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 47 deletions.
41 changes: 0 additions & 41 deletions mullvad-api/src/bin/relay_list.rs

This file was deleted.

4 changes: 2 additions & 2 deletions mullvad-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ impl AccountsProxy {

#[cfg(target_os = "android")]
pub fn init_play_purchase(
&mut self,
&self,
account: AccountToken,
) -> impl Future<Output = Result<PlayPurchasePaymentToken, rest::Error>> {
#[derive(serde::Deserialize)]
Expand All @@ -584,7 +584,7 @@ impl AccountsProxy {

#[cfg(target_os = "android")]
pub fn verify_play_purchase(
&mut self,
&self,
account: AccountToken,
play_purchase: PlayPurchase,
) -> impl Future<Output = Result<(), rest::Error>> {
Expand Down
8 changes: 4 additions & 4 deletions mullvad-daemon/src/device/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pub struct AccountService {

impl AccountService {
pub fn create_account(&self) -> impl Future<Output = Result<AccountToken, rest::Error>> {
let mut proxy = self.proxy.clone();
let proxy = self.proxy.clone();
let api_handle = self.api_availability.clone();
retry_future(
move || proxy.create_account(),
Expand Down Expand Up @@ -308,7 +308,7 @@ impl AccountService {
account_token: AccountToken,
voucher: String,
) -> Result<VoucherSubmission, Error> {
let mut proxy = self.proxy.clone();
let proxy = self.proxy.clone();
let api_handle = self.api_availability.clone();
let result = retry_future(
move || proxy.submit_voucher(account_token.clone(), voucher.clone()),
Expand All @@ -328,7 +328,7 @@ impl AccountService {
&self,
account_token: AccountToken,
) -> Result<PlayPurchasePaymentToken, Error> {
let mut proxy = self.proxy.clone();
let proxy = self.proxy.clone();
let api_handle = self.api_availability.clone();
let result = retry_future(
move || proxy.init_play_purchase(account_token.clone()),
Expand All @@ -349,7 +349,7 @@ impl AccountService {
account_token: AccountToken,
play_purchase: PlayPurchase,
) -> Result<(), Error> {
let mut proxy = self.proxy.clone();
let proxy = self.proxy.clone();
let api_handle = self.api_availability.clone();
let result = retry_future(
move || proxy.verify_play_purchase(account_token.clone(), play_purchase.clone()),
Expand Down

0 comments on commit 65f05db

Please sign in to comment.