summaryrefslogtreecommitdiffhomepage
path: root/mullvad-api/src/lib.rs
diff options
context:
space:
mode:
authorSebastian Holmin <sebastian.holmin@mullvad.net>2025-02-07 17:20:05 +0100
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-02-12 10:15:18 +0100
commitaf149bfa9600a5222b2b45e1df3c9ab29ea19231 (patch)
tree2c26badf7fa69b5dae7d1c3d091375bf9f87bb90 /mullvad-api/src/lib.rs
parent53a11fdfef7ae5a8ad73a83c988968d1c89caab4 (diff)
downloadmullvadvpn-af149bfa9600a5222b2b45e1df3c9ab29ea19231.tar.xz
mullvadvpn-af149bfa9600a5222b2b45e1df3c9ab29ea19231.zip
Fix "RPIT lifetime capture rules"
Diffstat (limited to 'mullvad-api/src/lib.rs')
-rw-r--r--mullvad-api/src/lib.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/mullvad-api/src/lib.rs b/mullvad-api/src/lib.rs
index a47c708b2e..997a0635c7 100644
--- a/mullvad-api/src/lib.rs
+++ b/mullvad-api/src/lib.rs
@@ -504,7 +504,7 @@ impl AccountsProxy {
pub fn get_data(
&self,
account: AccountNumber,
- ) -> impl Future<Output = Result<AccountData, rest::Error>> {
+ ) -> impl Future<Output = Result<AccountData, rest::Error>> + use<> {
let service = self.handle.service.clone();
let factory = self.handle.factory.clone();
async move {
@@ -517,7 +517,9 @@ impl AccountsProxy {
}
}
- pub fn create_account(&self) -> impl Future<Output = Result<AccountNumber, rest::Error>> {
+ pub fn create_account(
+ &self,
+ ) -> impl Future<Output = Result<AccountNumber, rest::Error>> + use<> {
#[derive(serde::Deserialize)]
struct AccountCreationResponse {
number: AccountNumber,
@@ -540,7 +542,7 @@ impl AccountsProxy {
&self,
account: AccountNumber,
voucher_code: String,
- ) -> impl Future<Output = Result<VoucherSubmission, rest::Error>> {
+ ) -> impl Future<Output = Result<VoucherSubmission, rest::Error>> + use<> {
#[derive(serde::Serialize)]
struct VoucherSubmission {
voucher_code: String,
@@ -562,7 +564,7 @@ impl AccountsProxy {
pub fn delete_account(
&self,
account: AccountNumber,
- ) -> impl Future<Output = Result<(), rest::Error>> {
+ ) -> impl Future<Output = Result<(), rest::Error>> + use<> {
let service = self.handle.service.clone();
let factory = self.handle.factory.clone();
@@ -629,7 +631,7 @@ impl AccountsProxy {
pub fn get_www_auth_token(
&self,
account: AccountNumber,
- ) -> impl Future<Output = Result<String, rest::Error>> {
+ ) -> impl Future<Output = Result<String, rest::Error>> + use<> {
#[derive(serde::Deserialize)]
struct AuthTokenResponse {
auth_token: String,
@@ -717,7 +719,7 @@ impl AppVersionProxy {
app_version: AppVersion,
platform: &str,
platform_version: String,
- ) -> impl Future<Output = Result<AppVersionResponse, rest::Error>> {
+ ) -> impl Future<Output = Result<AppVersionResponse, rest::Error>> + use<> {
let service = self.handle.service.clone();
let path = format!("{APP_URL_PREFIX}/releases/{platform}/{app_version}");